# Includes.
check_cxx_compiler_flag(-nostdinc++ COMPILER_RT_HAS_NOSTDINCXX_FLAG)
+check_cxx_compiler_flag(-nostdlib++ COMPILER_RT_HAS_NOSTDLIBXX_FLAG)
check_include_files("sys/auxv.h" COMPILER_RT_HAS_AUXV)
# Libraries.
# Remove -stdlib= which is unused when passing -nostdinc++.
string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
elseif(TARGET cxx-headers OR HAVE_LIBCXX)
+ # libFuzzer uses C++ standard library headers.
set(LIBFUZZER_DEPS cxx-headers)
endif()
# We don't use the C++ Standard Library here, so avoid including it by mistake.
append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ EXTRA_FLAGS)
-# Remove -stdlib= which is unused when passing -nostdinc++.
+# XRay uses C++ standard library headers.
string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# This appears to be a C-only warning banning the use of locals in aggregate
FOLDER "Compiler-RT Tests")
set(TSAN_UNITTEST_CFLAGS
- ${TSAN_CFLAGS}
${COMPILER_RT_UNITTEST_CFLAGS}
${COMPILER_RT_GTEST_CFLAGS}
-I${COMPILER_RT_SOURCE_DIR}/include
-I${COMPILER_RT_SOURCE_DIR}/lib
-I${COMPILER_RT_SOURCE_DIR}/lib/tsan/rtl
- -DGTEST_HAS_RTTI=0)
+ -DGTEST_HAS_RTTI=0
+ -fno-rtti
+)
set(TSAN_TEST_ARCH ${TSAN_SUPPORTED_ARCH})
RTSanitizerCommon
RTSanitizerCommonLibc)
+# XRay uses C++ standard library headers.
if (TARGET cxx-headers OR HAVE_LIBCXX)
set(XRAY_DEPS cxx-headers)
endif()