Differential Revision: https://reviews.llvm.org/D37043
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311516
91177308-0d34-0410-b5e6-
96231b3b80d8
set(LLVM_LINK_COMPONENTS support)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
+
add_clang_executable(clang-format-fuzzer
EXCLUDE_FROM_ALL
ClangFormatFuzzer.cpp
)
target_link_libraries(clang-format-fuzzer
- ${CLANG_FORMAT_LIB_DEPS}
- LLVMFuzzer
- )
+ ${CLANG_FORMAT_LIB_DEPS})
if( LLVM_USE_SANITIZE_COVERAGE )
set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
if(CLANG_ENABLE_PROTO_FUZZER)
# Create protobuf .h and .cc files, and put them in a library for use by
clangCXXProto
clangHandleCXX
clangProtoToCXX
- LLVMFuzzer
)
else()
# Hack to bypass LLVM's cmake sources check and allow multiple libraries and
target_link_libraries(clang-fuzzer
clangHandleCXX
- LLVMFuzzer
)
endif()