Skip to content

Commit a54ead4

Browse files
committed
Fix documentation for linkgroups
1 parent 8f174c4 commit a54ead4

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

website/docs/linkgroups.md

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,45 @@
1-
Turns on/off linkgroups for gcc/clang in the gmake backend.
1+
Turns on or off the linkgroups for option for linked libraries.
2+
3+
Notes:
4+
5+
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.
26

37
```lua
48
linkgroups ("value")
59
```
610

711
### Parameters ###
812

9-
`value` is a boolean value, i.e. "On" or "Off".
13+
`value` is one of:
14+
15+
| Value | Description |
16+
|---------|---------------------------------------------------|
17+
| On | Turn on link groups. |
18+
| Off | Turn off link groups. |
19+
20+
### Applies To ###
21+
22+
Project configurations
23+
24+
### Availability ###
1025

11-
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.
26+
Premake 4.0 or later. GCC and Clang toolsets only. Codelite, gmake, and gmake2 exporters only.
27+
28+
### Examples ###
29+
30+
```lua
31+
project "A"
32+
kind "StaticLib"
33+
34+
project "B"
35+
kind "StaticLib"
36+
links { "A" }
37+
38+
project "C"
39+
kind "ConsoleApp"
40+
links { "A", "B" }
41+
linkgroups "On"
42+
```
1243

13-
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.
44+
### See Also ###
45+
* [links](links.md)

0 commit comments

Comments
 (0)