summaryrefslogtreecommitdiff
path: root/xmake/core/tool/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-26 00:34:08 +0800
committerruki <[email protected]>2020-05-25 21:24:53 +0800
commit97b53dfcb67c898f40fae06b6b939e4dac32a3a0 (patch)
treec91bfc82592938ae27e2a72ec38737b33cd3988a /xmake/core/tool/compiler.lua
parent05b37be8865ff1af2051766a835e7576a6780e55 (diff)
add set_toolchains for target
Diffstat (limited to 'xmake/core/tool/compiler.lua')
-rw-r--r--xmake/core/tool/compiler.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua
index 27c81879c..1f0d7d6d6 100644
--- a/xmake/core/tool/compiler.lua
+++ b/xmake/core/tool/compiler.lua
@@ -71,19 +71,13 @@ end
function compiler._load_tool(sourcekind, target)
-- get program from target
- local program = nil
+ local program, toolname
if target then
- program = target:get("toolchain." .. sourcekind)
- if not program then
- local tools = target:get("tools") -- TODO: deprecated
- if tools then
- program = tools[sourcekind]
- end
- end
+ program, toolname = target:tool(sourcekind)
end
-- load the compiler tool from the source kind
- local result, errors = tool.load(sourcekind, program)
+ local result, errors = tool.load(sourcekind, program, toolname)
if not result then
return nil, errors
end