diff options
| author | KkemChen <[email protected]> | 2024-09-18 16:22:09 +0800 |
|---|---|---|
| committer | KkemChen <[email protected]> | 2024-09-18 16:22:09 +0800 |
| commit | d74dcf983f098440287e1b42f7bba1830b66e6f9 (patch) | |
| tree | ced8d8d3f85a0c43f9859ef9ccbf09608177c78e | |
| parent | ecfd44b5e5e0ca0d9f7ce5e592d870399f2bd4fe (diff) | |
fix "as_needed" flag order
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 97b826b68..9f31c11be 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -370,8 +370,8 @@ function nf_linkgroup(self, linkgroup, opt) end if as_needed then -- https://github.com/xmake-io/xmake/issues/5621 - table.insert(prefix_flags, "-Wl,--as-needed") - table.insert(suffix_flags, 1, "-Wl,--no-as-needed") + table.insert(prefix_flags, "-Wl,--no-as-needed") + table.insert(suffix_flags, 1, "-Wl,--as-needed") end if whole then table.insert(prefix_flags, "-Wl,--whole-archive") |
