diff options
Diffstat (limited to 'libfuzzer/CMakeLists.txt')
-rw-r--r-- | libfuzzer/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libfuzzer/CMakeLists.txt b/libfuzzer/CMakeLists.txt index b98c271..3201ed2 100644 --- a/libfuzzer/CMakeLists.txt +++ b/libfuzzer/CMakeLists.txt @@ -55,15 +55,15 @@ CHECK_CXX_SOURCE_COMPILES(" } " HAS_THREAD_LOCAL) -set(LIBFUZZER_CFLAGS ${SANITIZER_COMMON_CFLAGS}) +set(LIBFUZZER_CFLAGS ${COMPILER_RT_COMMON_CFLAGS}) if(OS_NAME MATCHES "Linux|Fuchsia" AND COMPILER_RT_LIBCXX_PATH AND COMPILER_RT_LIBCXXABI_PATH) - list(APPEND LIBFUZZER_CFLAGS -nostdinc++ -D_LIBCPP_ABI_VERSION=Fuzzer) - # Remove -stdlib= which is unused when passing -nostdinc++. - string(REGEX REPLACE "-stdlib=[a-zA-Z+]*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + list(APPEND LIBFUZZER_CFLAGS -D_LIBCPP_ABI_VERSION=Fuzzer) + append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ LIBFUZZER_CFLAGS) elseif(TARGET cxx-headers OR HAVE_LIBCXX) + # libFuzzer uses C++ standard library headers. set(LIBFUZZER_DEPS cxx-headers) endif() |