2015-01-30 07:01:07 +08:00
|
|
|
# Disable the coverage instrumentation for the fuzzer itself.
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fsanitize-coverage=0")
|
2015-01-30 00:58:29 +08:00
|
|
|
if( LLVM_USE_SANITIZE_COVERAGE )
|
2015-01-31 07:26:57 +08:00
|
|
|
add_library(LLVMFuzzerNoMain OBJECT
|
2015-01-30 00:58:29 +08:00
|
|
|
FuzzerCrossOver.cpp
|
|
|
|
FuzzerIO.cpp
|
|
|
|
FuzzerLoop.cpp
|
|
|
|
FuzzerMutate.cpp
|
2015-02-07 03:52:07 +08:00
|
|
|
FuzzerSanitizerOptions.cpp
|
2015-01-30 00:58:29 +08:00
|
|
|
FuzzerUtil.cpp
|
|
|
|
)
|
2015-01-31 07:26:57 +08:00
|
|
|
add_library(LLVMFuzzer STATIC
|
|
|
|
FuzzerMain.cpp
|
|
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMain>
|
|
|
|
)
|
2015-01-30 00:58:29 +08:00
|
|
|
|
|
|
|
if( LLVM_INCLUDE_TESTS )
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|
|
endif()
|