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 @@ -10,10 +10,10 @@ random.h ) -# Disable RTTI and exception support, as we want these libraries to be -# C-compatible. Regular C source files can be linked against the generated -# GwpAsan libraries using the Clang C compiler. -set(GWP_ASAN_CFLAGS -fno-rtti -fno-exceptions) +# 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++) if (COMPILER_RT_HAS_GWP_ASAN) foreach(arch ${GWP_ASAN_SUPPORTED_ARCH}) diff --git a/compiler-rt/lib/gwp_asan/random.h b/compiler-rt/lib/gwp_asan/random.h --- a/compiler-rt/lib/gwp_asan/random.h +++ b/compiler-rt/lib/gwp_asan/random.h @@ -9,7 +9,7 @@ #ifndef GWP_ASAN_RANDOM_H_ #define GWP_ASAN_RANDOM_H_ -#include +#include namespace gwp_asan { // xorshift (32-bit output), extremely fast PRNG that uses arithmetic operations diff --git a/compiler-rt/lib/gwp_asan/random.cpp b/compiler-rt/lib/gwp_asan/random.cpp --- a/compiler-rt/lib/gwp_asan/random.cpp +++ b/compiler-rt/lib/gwp_asan/random.cpp @@ -8,7 +8,7 @@ #include "gwp_asan/random.h" -#include +#include namespace gwp_asan { uint32_t getRandomUnsigned32() {