diff options
| author | ruki <[email protected]> | 2017-06-17 23:40:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-06-17 23:40:03 +0800 |
| commit | e701b9cbef180ca6b222327abab7b92cdf661fe1 (patch) | |
| tree | 152f5bac1956abe945054345f68db59c43b6e438 /xmake/platforms | |
| parent | f66d8f33bbfbcde8be896f63ef42048a931f7f13 (diff) | |
add find_toolname
Diffstat (limited to 'xmake/platforms')
| -rw-r--r-- | xmake/platforms/checker.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/platforms/checker.lua b/xmake/platforms/checker.lua index c6cb2b581..3672649e9 100644 --- a/xmake/platforms/checker.lua +++ b/xmake/platforms/checker.lua @@ -27,6 +27,7 @@ import("core.base.option") import("detect.sdk.find_xcode_dir") import("detect.sdk.find_xcode_sdkvers") import("lib.detect.find_tool") +import("lib.detect.find_toolname") -- find the given tool function _toolchain_check(config, toolkind, toolinfo) @@ -42,10 +43,10 @@ function _toolchain_check(config, toolkind, toolinfo) local cross = config.get("cross") or toolinfo.cross or "" -- get program name from the env if not cross-compilation - if cross:trim() == "" then + if config.get("plat") == os.host() and config.get("arch") ==os.arch() then local program = os.getenv(toolkind:upper():split('-')[1]) if program and program:trim() ~= "" then - toolpath = find_tool(name, {program = program}) + toolpath = find_tool(find_toolname(program), {program = program}) end end |
