aboutsummaryrefslogtreecommitdiff
path: root/tools/clang-format/fuzzer/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/clang-format/fuzzer/CMakeLists.txt')
-rw-r--r--tools/clang-format/fuzzer/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/clang-format/fuzzer/CMakeLists.txt b/tools/clang-format/fuzzer/CMakeLists.txt
index c7772fcb2f01..87ae05b62d19 100644
--- a/tools/clang-format/fuzzer/CMakeLists.txt
+++ b/tools/clang-format/fuzzer/CMakeLists.txt
@@ -1,11 +1,16 @@
set(LLVM_LINK_COMPONENTS support)
+if(LLVM_USE_SANITIZE_COVERAGE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
+endif()
+
add_clang_executable(clang-format-fuzzer
EXCLUDE_FROM_ALL
ClangFormatFuzzer.cpp
)
target_link_libraries(clang-format-fuzzer
+ PRIVATE
${CLANG_FORMAT_LIB_DEPS}
- LLVMFuzzer
+ ${LLVM_LIB_FUZZING_ENGINE}
)