Index: compiler-rt/lib/scudo/CMakeLists.txt =================================================================== --- compiler-rt/lib/scudo/CMakeLists.txt +++ compiler-rt/lib/scudo/CMakeLists.txt @@ -10,8 +10,8 @@ set(SCUDO_DYNAMIC_LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS}) # Use gc-sections by default to avoid unused code being pulled in. -list(APPEND SCUDO_CFLAGS -ffunction-sections -fdata-sections) -list(APPEND SCUDO_DYNAMIC_LINK_FLAGS -Wl,--gc-sections) +list(APPEND SCUDO_CFLAGS -nostdinc++ -ffunction-sections -fdata-sections) +list(APPEND SCUDO_DYNAMIC_LINK_FLAGS -nostdlib++ -Wl,--gc-sections) set(SCUDO_SOURCES scudo_allocator.cpp