summaryrefslogtreecommitdiff
path: root/xmake/core/tool/tool.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/tool/tool.lua')
-rw-r--r--xmake/core/tool/tool.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/core/tool/tool.lua b/xmake/core/tool/tool.lua
index 0443498fe..06a5ca3ad 100644
--- a/xmake/core/tool/tool.lua
+++ b/xmake/core/tool/tool.lua
@@ -246,6 +246,11 @@ function tool.load(kind, opt)
-- init cachekey
local cachekey = kind .. (program or "") .. plat .. arch .. (opt.host and "host" or "")
+ if toolchain_info and toolchain_info.cachekey then
+ -- it maybe contains target key
+ -- @see https://github.com/xmake-io/xmake/issues/6672
+ cachekey = cachekey .. toolchain_info.cachekey
+ end
-- get it directly from cache dirst
tool._TOOLS = tool._TOOLS or {}