Skip to main content

linkgroups

Turns on or off the linkgroups for option for linked libraries.

Notes:

Projects using GCC or Clang will use order dependent linking by default with the default linker. While it is generally believed to be slower, this option enables order independent linking within a group of libraries by putting them inside of a link-group using the -Wl,--start-group and -Wl,--end-group linker command line arguments.

linkgroups ("value")

Parameters

value is one of:

ValueDescription
OnTurn on link groups.
OffTurn off link groups.

Applies To

Project configurations

Availability

Premake 5.0-alpha10 or later. GCC and Clang toolsets only. Codelite, gmake, and gmake2 exporters only.

Examples

project "A"
kind "StaticLib"

project "B"
kind "StaticLib"
links { "A" }

project "C"
kind "ConsoleApp"
links { "A", "B" }
linkgroups "On"

See Also