summaryrefslogtreecommitdiff
path: root/xmake/core/tool/toolchain.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-14 22:43:43 +0800
committerruki <[email protected]>2020-12-14 22:43:43 +0800
commita6f93e44186006e0ee73450937608ec24fef192e (patch)
tree9bbadaeda9edc14f713c9bd284ddec922b791b05 /xmake/core/tool/toolchain.lua
parent4030bf655cd5bbf3af26b682078f4354eb2cb86c (diff)
add multivs tests
Diffstat (limited to 'xmake/core/tool/toolchain.lua')
-rw-r--r--xmake/core/tool/toolchain.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua
index 8775090a3..adb17c865 100644
--- a/xmake/core/tool/toolchain.lua
+++ b/xmake/core/tool/toolchain.lua
@@ -352,12 +352,9 @@ function _instance:_checktool(toolkind, toolpath)
end
end
- -- init cache key
- local cachekey = "toolchain_" .. self:plat() .. "_" .. self:arch()
-
-- find tool program
local program, toolname
- local tool = find_tool(toolpath, {cachekey = cachekey, program = toolpath, paths = self:bindir(), envs = self:get("runenvs")})
+ local tool = find_tool(toolpath, {cachekey = self:cachekey(), program = toolpath, paths = self:bindir(), envs = self:get("runenvs")})
if tool then
program = tool.program
toolname = tool.name
@@ -406,7 +403,7 @@ end
function toolchain._cachekey(name, opt)
local cachekey = opt.cachekey
if not cachekey then
- cachekey = name
+ cachekey = "toolchain_" .. name
for _, k in ipairs(table.orderkeys(opt)) do
local v = opt[k]
cachekey = cachekey .. "_" .. k .. "_" .. tostring(v)