summaryrefslogtreecommitdiff
path: root/xmake/core/tool/toolchain.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-12-13 22:51:02 +0800
committerruki <[email protected]>2020-12-13 22:51:02 +0800
commit361eda0cd491f887acfb842567f498a553249ad7 (patch)
tree028ed53dd9741d85835f275fbc67b060b4e95118 /xmake/core/tool/toolchain.lua
parent0f7d4ef7bf2c3d9e04fc104defb50e8c7f6583f1 (diff)
fix load toolchain
Diffstat (limited to 'xmake/core/tool/toolchain.lua')
-rw-r--r--xmake/core/tool/toolchain.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua
index 4eaa525b0..8775090a3 100644
--- a/xmake/core/tool/toolchain.lua
+++ b/xmake/core/tool/toolchain.lua
@@ -404,10 +404,13 @@ end
-- get cache key
function toolchain._cachekey(name, opt)
- local cachekey = name
- for _, k in ipairs(table.orderkeys(opt)) do
- local v = opt[k]
- cachekey = cachekey .. "_" .. k .. "_" .. tostring(v)
+ local cachekey = opt.cachekey
+ if not cachekey then
+ cachekey = name
+ for _, k in ipairs(table.orderkeys(opt)) do
+ local v = opt[k]
+ cachekey = cachekey .. "_" .. k .. "_" .. tostring(v)
+ end
end
return cachekey
end