Skip to content

Commit

Permalink
Fixed bug with linkgroups only working on Premake projects
Browse files Browse the repository at this point in the history
  • Loading branch information
samsinsane committed Feb 2, 2020
1 parent 63a1e5f commit 8c17f4b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tools/gcc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,6 @@
end
end

if not nogroups and #result > 1 and (cfg.linkgroups == p.ON) then
table.insert(result, 1, "-Wl,--start-group")
table.insert(result, "-Wl,--end-group")
end

-- The "-l" flag is fine for system libraries
local links = config.getlinks(cfg, "system", "fullpath")
local static_syslibs = {"-Wl,-Bstatic"}
Expand Down Expand Up @@ -511,6 +506,11 @@
end
move(shared_syslibs, result)

if not nogroups and #result > 1 and (cfg.linkgroups == p.ON) then
table.insert(result, 1, "-Wl,--start-group")
table.insert(result, "-Wl,--end-group")
end

return result
end

Expand Down

0 comments on commit 8c17f4b

Please sign in to comment.