From: Mitch Phillips <31459023+hctim@users.noreply.github.com> Date: Thu, 7 Nov 2019 15:41:08 +0000 (-0800) Subject: [GWP-ASan] Respect compiler-rt's -fno-lto X-Git-Tag: llvmorg-11-init~4797 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=343597789eba1e6482e130b0c1b0818b1432d311;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/compiler-rt/lib/gwp_asan/CMakeLists.txt b/compiler-rt/lib/gwp_asan/CMakeLists.txt index 84839e6..afdd624 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)