[compiler-rt] e7196bd - [Scudo][CMake] Add -fno-lto to Scudo libraries

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 10:30:10 PDT 2020


Author: Arthur Eubanks
Date: 2020-07-29T10:24:06-07:00
New Revision: e7196bdf81251a4df97746fd54b7db749ca99097

URL: https://github.com/llvm/llvm-project/commit/e7196bdf81251a4df97746fd54b7db749ca99097
DIFF: https://github.com/llvm/llvm-project/commit/e7196bdf81251a4df97746fd54b7db749ca99097.diff

LOG: [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

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/CMakeLists.txt b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
index bdaeb569efdd..dfae6dde5e4d 100644
--- a/compiler-rt/lib/scudo/standalone/CMakeLists.txt
+++ b/compiler-rt/lib/scudo/standalone/CMakeLists.txt
@@ -19,6 +19,9 @@ append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding SCUDO_CFLAGS)
 
 append_list_if(COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden SCUDO_CFLAGS)
 
+# FIXME: find cleaner way to agree with GWPAsan flags
+append_list_if(COMPILER_RT_HAS_FNO_LTO_FLAG -fno-lto SCUDO_CFLAGS)
+
 if (COMPILER_RT_HAS_GWP_ASAN)
   append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer
                 SCUDO_CFLAGS)


        


More information about the llvm-commits mailing list