morehouse created this revision. Herald added a subscriber: mgorny. https://reviews.llvm.org/D38853
Files: clang/tools/clang-format/CMakeLists.txt clang/tools/clang-format/fuzzer/CMakeLists.txt Index: clang/tools/clang-format/fuzzer/CMakeLists.txt =================================================================== --- clang/tools/clang-format/fuzzer/CMakeLists.txt +++ clang/tools/clang-format/fuzzer/CMakeLists.txt @@ -1,11 +1,15 @@ 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 ClangFormatFuzzer.cpp ) target_link_libraries(clang-format-fuzzer - ${CLANG_FORMAT_LIB_DEPS}) + ${CLANG_FORMAT_LIB_DEPS} + ${LIB_FUZZING_ENGINE} + ) Index: clang/tools/clang-format/CMakeLists.txt =================================================================== --- clang/tools/clang-format/CMakeLists.txt +++ clang/tools/clang-format/CMakeLists.txt @@ -15,7 +15,7 @@ ${CLANG_FORMAT_LIB_DEPS} ) -if( LLVM_USE_SANITIZE_COVERAGE ) +if( LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE ) add_subdirectory(fuzzer) endif()
Index: clang/tools/clang-format/fuzzer/CMakeLists.txt =================================================================== --- clang/tools/clang-format/fuzzer/CMakeLists.txt +++ clang/tools/clang-format/fuzzer/CMakeLists.txt @@ -1,11 +1,15 @@ 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 ClangFormatFuzzer.cpp ) target_link_libraries(clang-format-fuzzer - ${CLANG_FORMAT_LIB_DEPS}) + ${CLANG_FORMAT_LIB_DEPS} + ${LIB_FUZZING_ENGINE} + ) Index: clang/tools/clang-format/CMakeLists.txt =================================================================== --- clang/tools/clang-format/CMakeLists.txt +++ clang/tools/clang-format/CMakeLists.txt @@ -15,7 +15,7 @@ ${CLANG_FORMAT_LIB_DEPS} ) -if( LLVM_USE_SANITIZE_COVERAGE ) +if( LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE ) add_subdirectory(fuzzer) endif()
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits