2015-03-31 06:09:51 +08: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-07 00:09:13 +08:00
|
|
|
if( LLVM_USE_SANITIZE_COVERAGE )
|
2015-05-23 06:35:31 +08:00
|
|
|
add_library(LLVMFuzzerNoMainObjects OBJECT
|
2015-01-30 00:58:29 +08:00
|
|
|
FuzzerCrossOver.cpp
|
2015-05-23 06:35:31 +08:00
|
|
|
FuzzerInterface.cpp
|
2015-05-12 05:16:27 +08:00
|
|
|
FuzzerTraceState.cpp
|
2015-02-20 02:45:37 +08:00
|
|
|
FuzzerDriver.cpp
|
2015-01-30 00:58:29 +08:00
|
|
|
FuzzerIO.cpp
|
|
|
|
FuzzerLoop.cpp
|
|
|
|
FuzzerMutate.cpp
|
2015-02-07 03:52:07 +08:00
|
|
|
FuzzerSanitizerOptions.cpp
|
2015-05-15 06:41:49 +08:00
|
|
|
FuzzerSHA1.cpp
|
2015-01-30 00:58:29 +08:00
|
|
|
FuzzerUtil.cpp
|
|
|
|
)
|
2015-05-23 06:35:31 +08:00
|
|
|
add_library(LLVMFuzzerNoMain STATIC
|
|
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
|
|
|
|
)
|
2015-01-31 07:26:57 +08:00
|
|
|
add_library(LLVMFuzzer STATIC
|
|
|
|
FuzzerMain.cpp
|
2015-05-23 06:35:31 +08:00
|
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMainObjects>
|
2015-01-31 07:26:57 +08:00
|
|
|
)
|
2015-01-30 00:58:29 +08:00
|
|
|
|
|
|
|
if( LLVM_INCLUDE_TESTS )
|
|
|
|
add_subdirectory(test)
|
|
|
|
endif()
|
|
|
|
endif()
|