When -fPIC is enabled via LLVM_ENABLE_PIC, -fno-semantic-interposition
optimization flag is added on both Release and Debug builds. This patch enables
it only on release builds.
Details
Details
- Reviewers
MaskRay
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The exact issue is -fsanitize=fuzzer-no-link -fno-semantic-interposition -fPIC. The -O level does not matter.
Comment Actions
Correct, although, it is still an optimization flag, at least according to GCC documentation about optimization options (https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html) and as described by the above comments in the CMake configuration. Looking into the discussion on D102453, shouldn't we prefer reliability on debug builds rather than speed? Another point to take into consideration is build/link times, does this affect it?
EDIT: GCC disables -fsemantic-interposition when -Ofast is present.