2015-03-31 00:09:51 +02:00
|
|
|
set(LIBFUZZER_FLAGS_BASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
|
|
|
# Disable the coverage and sanitizer instrumentation for the fuzzer itself.
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${LIBFUZZER_FLAGS_BASE} -O2 -fno-sanitize=all")
|
2015-04-06 18:09:13 +02:00
|
|
|
if( LLVM_USE_SANITIZE_COVERAGE )
|
2015-05-23 00:35:31 +02:00
|
|
|
add_library(LLVMFuzzerNoMainObjects OBJECT
|
2015-01-29 17:58:29 +01:00
|
|
|
FuzzerCrossOver.cpp
|
2015-05-23 00:35:31 +02:00
|
|
|
FuzzerInterface.cpp
|
2015-05-11 23:16:27 +02:00
|
|
|
FuzzerTraceState.cpp
|
2015-02-19 19:45:37 +01:00
|
|
|
FuzzerDriver.cpp
|
2015-01-29 17:58:29 +01:00
|
|
|
FuzzerIO.cpp
|
|
|
|
FuzzerLoop.cpp
|
|
|
|
FuzzerMutate.cpp
|
2015-02-06 20:52:07 +01:00
|
|
|
FuzzerSanitizerOptions.cpp
|
2015-05-15 00:41:49 +02:00
|
|
|
FuzzerSHA1.cpp
|
2015-01-29 17:58:29 +01:00
|
|
|
FuzzerUtil.cpp
|
|
|
|
)
|
2015-05-23 00:35:31 +02:00
|
|
|
add_library(LLVMFuzzerNoMain STATIC
|
|
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
|
|
|
|
)
|
2015-01-31 00:26:57 +01:00
|
|
|
add_library(LLVMFuzzer STATIC
|
|
|
|
FuzzerMain.cpp
|
2015-05-23 00:35:31 +02:00
|
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
|
2015-01-31 00:26:57 +01:00
|
|
|
)
|
2015-01-29 17:58:29 +01:00
|
|
|
|
|
|
|
if( LLVM_INCLUDE_TESTS )
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|
|
endif()
|