[Scudo][CMake] Add -fno-lto to Scudo libraries
authorArthur Eubanks <aeubanks@google.com>
Tue, 28 Jul 2020 21:29:13 +0000 (14:29 -0700)
committerArthur Eubanks <aeubanks@google.com>
Wed, 29 Jul 2020 17:24:06 +0000 (10:24 -0700)
commite7196bdf81251a4df97746fd54b7db749ca99097
treeca9dfc73d34696f03abc50ead576dac3990d833b
parentcd890944ad344b1b8cac58332ab11c9eec6b61e9
[Scudo][CMake] Add -fno-lto to Scudo libraries

-fno-lto is in SANITIZER_COMMON_CFLAGS but not here.
Don't use SANITIZER_COMMON_CFLAGS because of performance issues.
See https://bugs.llvm.org/show_bug.cgi?id=46838.

Fixes
$ ninja TScudoCUnitTest-i386-Test
on an LLVM build with -DLLVM_ENABLE_LTO=Thin.
check-scudo now passes.

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D84805
compiler-rt/lib/scudo/standalone/CMakeLists.txt