-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-15063
-
-
C29_2.2.0.LTS
-
default
A linker issue causes code recompiled as part of link-time optimization to always use the "-O2" level of optimization. This means that when combined with -flto, code compiled with -O0 or -O1 may be faster, larger, and harder to debug. It also means that code compiled with -O3 may be significantly slower than expected when using link-time optimization.
As a workaround, affected programs may want to disable -flto entirely.
For performance-focused programs, excluding certain files from recompilation by not using -flto for those specific files may serve as an additional workaround.