From aa332adff92a4d51ec02b884276cded3ba9ec83c Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 9 Nov 2017 22:41:13 +0800 Subject: improve to configure cross-toolchains --- xmake/core/tool/tool.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmake/core/tool/tool.lua') 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 -- cgit v1.3.1