From 84ac2ca8ec5bb77cd994c6f4d42573920a45f14a Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 16 Mar 2020 22:54:16 +0800 Subject: improve to find toolchains --- xmake/modules/detect/sdks/find_cross_toolchain.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmake/modules/detect/sdks/find_cross_toolchain.lua b/xmake/modules/detect/sdks/find_cross_toolchain.lua index b36696f78..8c70e0b87 100644 --- a/xmake/modules/detect/sdks/find_cross_toolchain.lua +++ b/xmake/modules/detect/sdks/find_cross_toolchain.lua @@ -45,6 +45,12 @@ function _find_bindir(sdkdir, opt) if ldpath then return path.directory(ldpath), "" end + + -- attempt to use the bin directory + local bindir = opt.bindir or path.join(sdkdir, "bin") + if os.isdir(bindir) then + return bindir + end end -- find cross toolchain -- cgit v1.3.1