aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Fuzzer/CMakeLists.txt
blob: 81e51d1a7cc2ae567975c3a9bcdbddabf7912349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Disable the coverage instrumentation for the fuzzer itself.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fsanitize-coverage=0")
if( LLVM_USE_SANITIZE_COVERAGE  )
  add_library(LLVMFuzzerNoMain OBJECT
    FuzzerCrossOver.cpp
    FuzzerDriver.cpp
    FuzzerIO.cpp
    FuzzerLoop.cpp
    FuzzerMutate.cpp
    FuzzerSanitizerOptions.cpp
    FuzzerUtil.cpp
    )
  add_library(LLVMFuzzer STATIC
    FuzzerMain.cpp
    $<TARGET_OBJECTS:LLVMFuzzerNoMain>
    )

  if( LLVM_INCLUDE_TESTS )
    add_subdirectory(test)
  endif()
endif()