summaryrefslogtreecommitdiff
path: root/xmake/core/tool/linker.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/tool/linker.lua')
-rw-r--r--xmake/core/tool/linker.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/core/tool/linker.lua b/xmake/core/tool/linker.lua
index ed1f47daa..b3f91a904 100644
--- a/xmake/core/tool/linker.lua
+++ b/xmake/core/tool/linker.lua
@@ -39,13 +39,13 @@ local compiler = require("tool/compiler")
-- add flags from the platform
function linker:_add_flags_from_platform(flags, targetkind)
- -- attempt to add special lanugage flags first for target kind, e.g. binary.go.gc-ldflags, static.dc-arflags
+ -- attempt to add special lanugage flags first for target kind, e.g. binary.go.gcldflags, static.dcarflags
if targetkind then
local toolkind = self:kind()
local toolname = self:name()
for _, flagkind in ipairs(self:_flagkinds()) do
- local toolflags = platform.get(targetkind .. '.' .. toolname .. '.' .. toolkind .. 'flags') or platform.get(targetkind .. '.' .. toolname .. '.' .. flagkind)
- table.join2(flags, toolflags or platform.get(targetkind .. '.' .. toolkind .. 'flags') or platform.get(targetkind .. '.' .. flagkind))
+ local toolflags = platform.toolconfig(targetkind .. '.' .. toolname .. '.' .. toolkind .. 'flags') or platform.toolconfig(targetkind .. '.' .. toolname .. '.' .. flagkind)
+ table.join2(flags, toolflags or platform.toolconfig(targetkind .. '.' .. toolkind .. 'flags') or platform.toolconfig(targetkind .. '.' .. flagkind))
end
end
end
@@ -57,7 +57,7 @@ function linker:_add_flags_from_linker(flags)
local toolkind = self:kind()
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. gcldflags, dcarflags
table.join2(flags, self:get(toolkind .. 'flags') or self:get(flagkind))
end
end
@@ -185,9 +185,9 @@ function linker.load(targetkind, sourcekinds, target)
local toolname = linkertool:name()
for _, flagkind in ipairs(instance:_flagkinds()) do
- -- add special lanugage flags first, e.g. go.gc-ldflags or gcc.ldflags or gc-ldflags or ldflags
- linkertool:add(toolkind .. 'flags', platform.get(toolname .. '.' .. toolkind .. 'flags') or platform.get(toolkind .. 'flags'))
- linkertool:add(flagkind, platform.get(toolname .. '.' .. flagkind) or platform.get(flagkind))
+ -- add special lanugage flags first, e.g. go.gcldflags or gcc.ldflags or gcldflags or ldflags
+ linkertool:add(toolkind .. 'flags', platform.toolconfig(toolname .. '.' .. toolkind .. 'flags') or platform.toolconfig(toolkind .. 'flags'))
+ linkertool:add(flagkind, platform.toolconfig(toolname .. '.' .. flagkind) or platform.toolconfig(flagkind))
end
-- ok