summaryrefslogtreecommitdiffstats
path: root/documentation/LTO
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/LTO')
-rw-r--r--documentation/LTO11
1 files changed, 11 insertions, 0 deletions
diff --git a/documentation/LTO b/documentation/LTO
new file mode 100644
index 0000000..6bb3a18
--- /dev/null
+++ b/documentation/LTO
@@ -0,0 +1,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.