summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2023-10-26 23:03:24 +0800
committerruki <[email protected]>2023-10-26 23:03:24 +0800
commitaba13c082febc372a5fa89433034c5c2178c4210 (patch)
tree22755e24ffc8282a062088438bcb0a342393818a /xmake/modules/core
parente8546618488456f507e3a73844393bd18c218218 (diff)
improve builder extra
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/gcc.lua18
1 files changed, 5 insertions, 13 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index ecc4eed98..1d4a9e8f9 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -314,18 +314,10 @@ function nf_linkgroup(self, linkgroup, opt)
table.insert(linkflags, nf_link(self, lib))
end
local flags = {}
- local target = opt.target
- local extras = opt.extras or target:extraconf("linkgroups")
- if extras then
- if type(linkgroup) == "table" then
- extras = extras[table.concat(linkgroup, "_")]
- else
- extras = extras[linkgroup]
- end
- end
- if extras and not self:is_plat("macosx", "windows", "mingw") then
- local group = extras.group
- local whole = extras.whole
+ local extra = opt.extra
+ if extra and not self:is_plat("macosx", "windows", "mingw") then
+ local group = extra.group
+ local whole = extra.whole
if group and whole then
-- https://github.com/xmake-io/xmake/issues/4308
table.join2(flags, "-Wl,--whole-archive", "-Wl,--start-group", linkflags, "-Wl,--end-group", "-Wl,--no-whole-archive")
@@ -334,7 +326,7 @@ function nf_linkgroup(self, linkgroup, opt)
elseif whole then
table.join2(flags, "-Wl,--whole-archive", linkflags, "-Wl,--no-whole-archive")
end
- local static = extras.static
+ local static = extra.static
if static then
table.join2(flags, "-Wl,-Bstatic", linkflags, "-Wl,-Bdynamic")
end