diff options
| author | ruki <[email protected]> | 2016-06-10 13:46:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-06-10 13:46:25 +0800 |
| commit | 04619be0d8ff954508bffc017507cbd1e5ea058c (patch) | |
| tree | 553391e7667792510d94c1ed7858c97e8704934f | |
| parent | 38c07cd824a33740accf14dda963aad1f2dc9366 (diff) | |
fix cross checker
| -rw-r--r-- | xmake/platforms/linux/checker.lua | 10 | ||||
| -rw-r--r-- | xmake/platforms/mingw/checker.lua | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/xmake/platforms/linux/checker.lua b/xmake/platforms/linux/checker.lua index 499a5ef1d..324f52f72 100644 --- a/xmake/platforms/linux/checker.lua +++ b/xmake/platforms/linux/checker.lua @@ -54,11 +54,11 @@ function _check_toolchains(config) -- get cross local cross = "" if toolchains then - local arpathes = os.match(path.join(toolchains, "*-ar")) - for _, arpath in ipairs(arpathes) do - local arname = path.basename(arpath) - if arname then - cross = arname:sub(1, -3) + local ldpathes = os.match(path.join(toolchains, "*-ld")) + for _, ldpath in ipairs(ldpathes) do + local ldname = path.basename(ldpath) + if ldname then + cross = ldname:sub(1, -3) end end end diff --git a/xmake/platforms/mingw/checker.lua b/xmake/platforms/mingw/checker.lua index b8aaf568d..d2f50b884 100644 --- a/xmake/platforms/mingw/checker.lua +++ b/xmake/platforms/mingw/checker.lua @@ -39,11 +39,11 @@ function _check_toolchains(config) -- get cross local cross = "" if toolchains then - local arpathes = os.match(path.join(toolchains, "*-ar")) - for _, arpath in ipairs(arpathes) do - local arname = path.basename(arpath) - if arname then - cross = arname:sub(1, -3) + local ldpathes = os.match(path.join(toolchains, "*-ld")) + for _, ldpath in ipairs(ldpathes) do + local ldname = path.basename(ldpath) + if ldname then + cross = ldname:sub(1, -3) end end end |
