summaryrefslogtreecommitdiffstats
path: root/documentation/LTO
blob: 6bb3a186a4525a53dc78b35835ecb8f3bf62517a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
To enable LTO, follow these simple steps:

    Add option -flto to the invocation of compiler.
    Add option -flto to the invocation of the linker. Additionally, you need
	to add all options from the compiler invocations to the invocation of
	the linker. So if you called your compiler with
	“-march=i486 -O3 -fno-stack-protector“,
	you will need to pass the same options to the linker.


Note: LTO performs heavy memory optimizations that break debugging, so we recommend using it only with the release profile, not debugging and develop.