summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-08-10 22:40:06 +0800
committerruki <[email protected]>2023-08-10 22:40:06 +0800
commitfdead41fed6b6d0d1d8c699f810bf8ffbf995a8b (patch)
treee8d2af09929ac9a146786da1b0ab2952160e2f8a
parente7295a53245dd849fd17b07c98dc157a144d40be (diff)
fix get tool from toolset
-rw-r--r--xmake/core/project/target.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index d634dfe42..60a4d182a 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -2111,8 +2111,10 @@ function _instance:tool(toolkind)
end
return toolchain.tool(self:toolchains(), toolkind, {cachekey = "target_" .. self:name(), plat = self:plat(), arch = self:arch(),
before_get = function()
+ -- get program from set_toolset
+ local program = self:get("toolset." .. toolkind)
+
-- get program from `xmake f --cc`
- local program
if not program and not self:get("toolchains") then
program = config.get(toolkind)
end