diff options
| author | ruki <[email protected]> | 2021-03-21 14:44:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-21 14:44:02 +0800 |
| commit | 84967845ae815d903e2c120b9b05bc7dc7da0a89 (patch) | |
| tree | 357cb7e05404d9574d184bfc58c63483b32148b3 | |
| parent | f4333905bba49775a03def29e7b588246aaef4bf (diff) | |
improve linker
| -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)) |
