[compiler-rt][fuzzer] Do not link in libc++ in tests and disable exceptions

Differential Revision: https://reviews.llvm.org/D109208
This commit is contained in:
Leonard Chan 2021-09-08 11:45:52 -07:00
parent 056d024235
commit e170cf5061
1 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,8 @@ endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
COMPILER_RT_LIBCXX_PATH AND
COMPILER_RT_LIBCXXABI_PATH)
list(APPEND LIBFUZZER_UNITTEST_CFLAGS -nostdinc++)
list(APPEND LIBFUZZER_UNITTEST_CFLAGS -nostdinc++ -fno-exceptions)
list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS -nostdlib++ -fno-exceptions)
endif()
if ("-fvisibility=hidden" IN_LIST LIBFUZZER_CFLAGS)