diff options
| -rw-r--r-- | xmake/core/project/target.lua | 4 |
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 |
