diff --git a/compiler-rt/lib/gwp_asan/CMakeLists.txt b/compiler-rt/lib/gwp_asan/CMakeLists.txt --- a/compiler-rt/lib/gwp_asan/CMakeLists.txt +++ b/compiler-rt/lib/gwp_asan/CMakeLists.txt @@ -33,10 +33,10 @@ # 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 +set(GWP_ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS} -fno-rtti -fno-exceptions -nostdinc++ -pthread -fno-omit-frame-pointer) append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC GWP_ASAN_CFLAGS) -append_list_if(COMPILER_RT_HAS_SANITIZER_COMMON, ${SANITIZER_COMMON_CFLAGS} GWP_ASAN_CFLAGS) +# append_list_if(COMPILER_RT_HAS_SANITIZER_COMMON ${SANITIZER_COMMON_CFLAGS} GWP_ASAN_CFLAGS) # Remove -stdlib= which is unused when passing -nostdinc++. string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})