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.