summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_cross_toolchain.lua10
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