diff options
Diffstat (limited to 'xmake/core/tool/toolchain.lua')
| -rw-r--r-- | xmake/core/tool/toolchain.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index ac0363d3d..868d05746 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -406,12 +406,22 @@ function _instance:_checktool(toolkind, toolpath) end end - -- find tool program + -- contain toolname? parse it, e.g. '[email protected]' + -- https://github.com/xmake-io/xmake/issues/1361 local program, toolname - local tool = find_tool(toolpath, {cachekey = cachekey, program = toolpath, paths = self:bindir(), envs = self:get("runenvs")}) + if toolpath then + local pos = toolpath:find('@', 1, true) + if pos then + toolname = toolpath:sub(1, pos - 1) + program = toolpath:sub(pos + 1) + end + end + + -- find tool program + local tool = find_tool(toolpath, {cachekey = cachekey, program = program or toolpath, paths = self:bindir(), envs = self:get("runenvs")}) if tool then program = tool.program - toolname = tool.name + toolname = toolname or tool.name end -- get tool description from the tool kind |
