diff options
| -rw-r--r-- | xmake/core/tool/linker.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |
