From 84967845ae815d903e2c120b9b05bc7dc7da0a89 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 21 Mar 2021 14:44:02 +0800 Subject: improve linker --- xmake/core/tool/linker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua index cc67088a2..25276bdce 100644 --- a/xmake/core/tool/linker.lua +++ b/xmake/core/tool/linker.lua @@ -43,7 +43,7 @@ function linker:_add_flags_from_toolchains(flags, targetkind, target) if targetkind then local toolkind = self:kind() local toolname = self:name() - if target and target:type() == "target" then + if target and target.toolconfig then for _, flagkind in ipairs(self:_flagkinds()) do local toolflags = target:toolconfig(targetkind .. '.' .. toolname .. '.' .. toolkind .. 'flags') or target:toolconfig(targetkind .. '.' .. toolname .. '.' .. flagkind) table.join2(flags, toolflags or target:toolconfig(targetkind .. '.' .. toolkind .. 'flags') or target:toolconfig(targetkind .. '.' .. flagkind)) -- cgit v1.3.1