diff options
| -rw-r--r-- | xmake/core/tool/toolchain.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_rc.lua | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index 66321dfa4..87a28cb69 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -449,7 +449,11 @@ function _instance:_checktool(toolkind, toolpath) end -- find tool program - local tool = find_tool(toolpath, {toolchain = self, cachekey = cachekey, program = program or toolpath, paths = self:bindir(), envs = self:get("runenvs")}) + local tool = find_tool(toolpath, {toolchain = self, + cachekey = cachekey, + program = program or toolpath, + paths = self:bindir(), + envs = self:get("runenvs")}) if tool then program = tool.program toolname = toolname or tool.name diff --git a/xmake/modules/detect/tools/find_rc.lua b/xmake/modules/detect/tools/find_rc.lua index 6e04ac950..08db8fb87 100644 --- a/xmake/modules/detect/tools/find_rc.lua +++ b/xmake/modules/detect/tools/find_rc.lua @@ -59,6 +59,8 @@ function main(opt) -- local envs = opt.envs if envs and envs.WindowsSdkDir and envs.WindowsSDKVersion then + local toolchain = opt.toolchain + local arch = toolchain and toolchain:arch() or config.arch() local bindir = path.join(envs.WindowsSdkDir, "bin", envs.WindowsSDKVersion, arch) if os.isdir(bindir) then opt.paths = opt.paths or {} |
