-
-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix documentation for linkgroups (#2369)
- Loading branch information
1 parent
a861320
commit 8c84447
Showing
1 changed file
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,45 @@ | ||
Turns on/off linkgroups for gcc/clang in the gmake backend. | ||
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. | ||
|
||
```lua | ||
linkgroups ("value") | ||
``` | ||
|
||
### Parameters ### | ||
|
||
`value` is a boolean value, i.e. "On" or "Off". | ||
`value` is one of: | ||
|
||
| Value | Description | | ||
|---------|---------------------------------------------------| | ||
| On | Turn on link groups. | | ||
| Off | Turn off link groups. | | ||
|
||
### Applies To ### | ||
|
||
Project configurations | ||
|
||
### Availability ### | ||
|
||
When linking against another projects or libraries gcc/clang by default have order dependent linking, at least with the general default linker. While it is generally believed to be slower, you can enable 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 command line arguments. | ||
Premake 5.0-alpha10 or later. GCC and Clang toolsets only. Codelite, gmake, and gmake2 exporters only. | ||
|
||
### Examples ### | ||
|
||
```lua | ||
project "A" | ||
kind "StaticLib" | ||
|
||
project "B" | ||
kind "StaticLib" | ||
links { "A" } | ||
|
||
project "C" | ||
kind "ConsoleApp" | ||
links { "A", "B" } | ||
linkgroups "On" | ||
``` | ||
|
||
This API turns this grouping on or off (it is off by default), and applies to all libraries specified in the [links](links.md) API. | ||
### See Also ### | ||
* [links](links.md) |