summaryrefslogtreecommitdiff
path: root/xmake/core/tool/linker.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-13 22:48:36 +0800
committerruki <[email protected]>2018-11-13 10:51:40 +0800
commit7d234801498d6e272d780407695ebff89a64d675 (patch)
tree28313737e1c44c3d639fbf49ab05ed0bc68ec1d4 /xmake/core/tool/linker.lua
parentbcfe7b269dc8ccca180099c8ce62f333a405ed11 (diff)
improve compiler tools
Diffstat (limited to 'xmake/core/tool/linker.lua')
-rw-r--r--xmake/core/tool/linker.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua
index 363e7ad30..16bcbfe27 100644
--- a/xmake/core/tool/linker.lua
+++ b/xmake/core/tool/linker.lua
@@ -73,12 +73,11 @@ function linker:_addflags_from_compiler(flags, target, targetkind)
if instance then
for _, flagkind in ipairs(self:_flagkinds()) do
- -- attempt to add special lanugage flags first, .e.g gc-ldflags, dc-arflags
+ -- attempt to add special lanugage flags first, e.g. gc-ldflags, dc-arflags
table.join2(flags_of_compiler, instance:get(toolkind .. 'flags') or instance:get(flagkind))
- -- attempt to add special lanugage flags first for target kind, .e.g gc-ldflags, dc-arflags
- local targetflags = instance:get(targetkind) or {}
- table.join2(flags_of_compiler, targetflags[toolkind .. 'flags'] or targetflags[flagkind])
+ -- attempt to add special lanugage flags first for target kind, e.g. targetkind.gc-ldflags, targetkind.dc-arflags
+ table.join2(flags_of_compiler, instance:get(targetkind .. '.' .. toolkind .. 'flags') or instance:get(targetkind .. '.' .. flagkind))
end
end
end