diff options
| author | ruki <[email protected]> | 2021-03-27 23:24:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-27 23:24:34 +0800 |
| commit | 56f568d355131c3408fee3edfbf55b4c1ecc39b8 (patch) | |
| tree | 01684b2685055fa2984fc244adba704796db70bf | |
| parent | 46fca3e93f45430a6dc7cf3fb03e4b5421d9a231 (diff) | |
improve to find cross toolchain
| -rw-r--r-- | xmake/modules/detect/sdks/find_cross_toolchain.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/modules/detect/sdks/find_cross_toolchain.lua b/xmake/modules/detect/sdks/find_cross_toolchain.lua index 800e12a26..04c66e626 100644 --- a/xmake/modules/detect/sdks/find_cross_toolchain.lua +++ b/xmake/modules/detect/sdks/find_cross_toolchain.lua @@ -43,15 +43,17 @@ function _find_bindir(sdkdir, opt) end -- find tool path - toolpath = find_file(toolname, bindirs) - if toolpath then - return path.directory(toolpath), "" + if not opt.cross then + toolpath = find_file(toolname, bindirs) + if toolpath then + return path.directory(toolpath), "" + end end end -- attempt to use the bin directory local bindir = opt.bindir or path.join(sdkdir, "bin") - if os.isdir(bindir) then + if os.isdir(bindir) and not opt.cross then return bindir end end |
