summaryrefslogtreecommitdiff
path: root/xmake/core/tool/tool.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-11-09 22:41:13 +0800
committerruki <[email protected]>2017-11-09 10:07:18 +0800
commitaa332adff92a4d51ec02b884276cded3ba9ec83c (patch)
tree46476171b7a637504dd1871dcfb9b51de548cfbe /xmake/core/tool/tool.lua
parent31b1517d8303402f34f70fec8a7d6d644b1a10db (diff)
improve to configure cross-toolchains
Diffstat (limited to 'xmake/core/tool/tool.lua')
-rw-r--r--xmake/core/tool/tool.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/tool/tool.lua b/xmake/core/tool/tool.lua
index ba7388526..0cd02120f 100644
--- a/xmake/core/tool/tool.lua
+++ b/xmake/core/tool/tool.lua
@@ -109,8 +109,8 @@ function tool.load(kind)
return tool._TOOLS[kind]
end
- -- get the tool program
- local program = platform.tool(kind)
+ -- get the tool program and name
+ local program, toolname = platform.tool(kind)
if not program then
return nil, string.format("cannot get tool for %s", kind)
end
@@ -119,7 +119,7 @@ function tool.load(kind)
tool._find_toolname = tool._find_toolname or import("lib.detect.find_toolname")
-- get the tool name from the program
- local ok, name_or_errors = sandbox.load(tool._find_toolname, program)
+ local ok, name_or_errors = sandbox.load(tool._find_toolname, toolname or program, {program = program})
if not ok then
return nil, name_or_errors
end