summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2023-09-30 15:21:45 +0800
committerruki <[email protected]>2023-09-30 15:21:45 +0800
commit874bbc55860ab798072f7dba9a53fd6e3895c6f9 (patch)
tree0e41b7a86f35a24e32e6d8d95cbd2a94c53d7ccb /xmake/modules/core
parentc19eb9cdad616568851a9e9f9e31832938cae8ed (diff)
add -Bstatic for linkgroup
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/gcc.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 0c13552e9..f87eb24ea 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -320,6 +320,10 @@ function nf_linkgroup(self, linkgroup, target)
if whole then
table.join2(flags, "-Wl,--whole-archive", linkflags, "-Wl,--no-whole-archive")
end
+ local static = target:extraconf("linkgroups", linkgroup, "static")
+ if static then
+ table.join2(flags, "-Wl,-Bstatic", linkflags, "-Wl,-Bdynamic")
+ end
end
if #flags == 0 then
flags = linkflags