summaryrefslogtreecommitdiffstats
path: root/documentation/LTO
diff options
context:
space:
mode:
authorRegia König2022-03-10 14:51:02 +0100
committerRegia König2022-03-10 14:51:02 +0100
commite97baaaa249e922a15b586d10a340c8e1076ad6d (patch)
tree76098632d8a8bb965963cbe5675fd00318d0b3ff /documentation/LTO
parentAdd stuff (diff)
downloadmemtest86-e97baaaa249e922a15b586d10a340c8e1076ad6d.tar.gz
memtest86-e97baaaa249e922a15b586d10a340c8e1076ad6d.tar.xz
memtest86-e97baaaa249e922a15b586d10a340c8e1076ad6d.zip
Split build process into debug build and release build (gdb vs lto)
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.