Guard fuzzer build behind Clang-only flags.

Should fix sanitizer buildbots and any one else who's building
compiler-rt using gcc.

llvm-svn: 369055
This commit is contained in:
Mitch Phillips 2019-08-15 22:15:46 +00:00
parent 9106f8c87e
commit 2fb4e754c6
1 changed files with 12 additions and 11 deletions

View File

@ -100,17 +100,18 @@ if (COMPILER_RT_HAS_GWP_ASAN)
CFLAGS ${GWP_ASAN_CFLAGS} ${SANITIZER_COMMON_CFLAGS})
# Build the stack trace compressor fuzzer.
add_llvm_executable(stack_trace_compressor_fuzzer
stack_trace_compressor_fuzzer.cpp
${GWP_ASAN_SOURCES}
${GWP_ASAN_HEADERS})
set_target_properties(stack_trace_compressor_fuzzer
PROPERTIES FOLDER "Fuzzers")
target_compile_options(stack_trace_compressor_fuzzer
PRIVATE -fsanitize=fuzzer-no-link)
set_target_properties(stack_trace_compressor_fuzzer PROPERTIES LINK_FLAGS
-fsanitize=fuzzer)
add_dependencies(gwp_asan stack_trace_compressor_fuzzer)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_llvm_executable(stack_trace_compressor_fuzzer
stack_trace_compressor_fuzzer.cpp
${GWP_ASAN_SOURCES}
${GWP_ASAN_HEADERS})
set_target_properties(stack_trace_compressor_fuzzer
PROPERTIES FOLDER "Fuzzers")
target_compile_options(stack_trace_compressor_fuzzer
PRIVATE -fsanitize=fuzzer-no-link)
target_link_options(stack_trace_compressor_fuzzer PRIVATE -fsanitize=fuzzer)
add_dependencies(gwp_asan stack_trace_compressor_fuzzer)
endif()
endif()
if(COMPILER_RT_INCLUDE_TESTS)