diff options
| author | ruki <[email protected]> | 2023-01-08 19:27:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-08 19:27:43 +0800 |
| commit | 7894e62157c0a1e431f347fb5a45947855bee8cd (patch) | |
| tree | 4e5f9b2c8a1b310bb9116d06d5b203b4b2a41896 | |
| parent | 6cfdc39bc02cc7fcccb82dcb5abd4d30c624db00 (diff) | |
fix find_rc
| -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 {} |
