Reviewers: kcc, bogner
Reviewed By: kcc
Subscribers: cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D38853
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315603
91177308-0d34-0410-b5e6-
96231b3b80d8
${CLANG_FORMAT_LIB_DEPS}
)
-if( LLVM_USE_SANITIZE_COVERAGE )
+if( LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
add_subdirectory(fuzzer)
endif()
set(LLVM_LINK_COMPONENTS support)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
+if(LLVM_USE_SANITIZE_COVERAGE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
+endif()
add_clang_executable(clang-format-fuzzer
EXCLUDE_FROM_ALL
)
target_link_libraries(clang-format-fuzzer
- ${CLANG_FORMAT_LIB_DEPS})
+ ${CLANG_FORMAT_LIB_DEPS}
+ ${LIB_FUZZING_ENGINE}
+ )