[compiler-rt] 3435977 - [GWP-ASan] Respect compiler-rt's -fno-lto
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 07:43:25 PST 2019
Author: Mitch Phillips
Date: 2019-11-07T07:43:02-08:00
New Revision: 343597789eba1e6482e130b0c1b0818b1432d311
URL: https://github.com/llvm/llvm-project/commit/343597789eba1e6482e130b0c1b0818b1432d311
DIFF: https://github.com/llvm/llvm-project/commit/343597789eba1e6482e130b0c1b0818b1432d311.diff
LOG: [GWP-ASan] Respect compiler-rt's -fno-lto
https://bugs.llvm.org/show_bug.cgi?id=43722
GWP-ASan didn't include SANITIZER_COMMON_CFLAGS, and thus would produce
LLVM bitcode files, when compiler-rt is generally built without LTO.
Added:
Modified:
compiler-rt/lib/gwp_asan/CMakeLists.txt
Removed:
################################################################################
diff --git a/compiler-rt/lib/gwp_asan/CMakeLists.txt b/compiler-rt/lib/gwp_asan/CMakeLists.txt
index 84839e63f8e4..afdd624017aa 100644
--- a/compiler-rt/lib/gwp_asan/CMakeLists.txt
+++ b/compiler-rt/lib/gwp_asan/CMakeLists.txt
@@ -23,7 +23,8 @@ set(GWP_ASAN_HEADERS
# Ensure that GWP-ASan meets the delegated requirements of some supporting
# allocators. Some supporting allocators (e.g. scudo standalone) cannot use any
# parts of the C++ standard library.
-set(GWP_ASAN_CFLAGS -fno-rtti -fno-exceptions -nostdinc++ -pthread)
+set(GWP_ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS} -fno-rtti -fno-exceptions
+ -nostdinc++ -pthread)
append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC GWP_ASAN_CFLAGS)
append_list_if(COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG -fno-omit-frame-pointer
GWP_ASAN_CFLAGS)
More information about the llvm-commits
mailing list