summaryrefslogtreecommitdiff
path: root/xmake/core/tool/linker.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/linker.lua
parent05b37be8865ff1af2051766a835e7576a6780e55 (diff)
add set_toolchains for target
Diffstat (limited to 'xmake/core/tool/linker.lua')
-rw-r--r--xmake/core/tool/linker.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua
index b3f91a904..bbb088e7c 100644
--- a/xmake/core/tool/linker.lua
+++ b/xmake/core/tool/linker.lua
@@ -78,19 +78,13 @@ function linker._load_tool(targetkind, sourcekinds, target)
for _, _linkerinfo in ipairs(linkerinfos) do
-- get program from target
- local program = nil
+ local program, toolname
if target then
- program = target:get("toolchain." .. _linkerinfo.linkerkind)
- if not program then
- local tools = target:get("tools") -- TODO: deprecated
- if tools then
- program = tools[_linkerinfo.linkerkind]
- end
- end
+ program, toolname = target:tool(_linkerinfo.linkerkind)
end
-- load the linker tool from the linker kind (with cache)
- linkertool, errors = tool.load(_linkerinfo.linkerkind, program)
+ linkertool, errors = tool.load(_linkerinfo.linkerkind, program, toolname)
if linkertool then
linkerinfo = _linkerinfo
linkerinfo.program = program