From 82a2202ae6f1107ee61ee354b6214150743746c1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 6 Apr 2015 16:10:32 +0000 Subject: [PATCH] Gating clang-fuzzer on the same conditions required to build the LLVMFuzzer library. Otherwise, we can run into a situation where clang-fuzzer attempts to build, but its dependency was never built. llvm-svn: 234170 --- clang/tools/clang-fuzzer/CMakeLists.txt | 34 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/clang/tools/clang-fuzzer/CMakeLists.txt b/clang/tools/clang-fuzzer/CMakeLists.txt index 8721314..a6c19e1 100644 --- a/clang/tools/clang-fuzzer/CMakeLists.txt +++ b/clang/tools/clang-fuzzer/CMakeLists.txt @@ -1,18 +1,20 @@ -set(LLVM_LINK_COMPONENTS support) +if( LLVM_USE_SANITIZE_COVERAGE ) + set(LLVM_LINK_COMPONENTS support) -add_clang_executable(clang-fuzzer - EXCLUDE_FROM_ALL - ClangFuzzer.cpp - ) + add_clang_executable(clang-fuzzer + EXCLUDE_FROM_ALL + ClangFuzzer.cpp + ) -target_link_libraries(clang-fuzzer - ${CLANG_FORMAT_LIB_DEPS} - clangAST - clangBasic - clangDriver - clangFrontend - clangRewriteFrontend - clangStaticAnalyzerFrontend - clangTooling - LLVMFuzzer - ) + target_link_libraries(clang-fuzzer + ${CLANG_FORMAT_LIB_DEPS} + clangAST + clangBasic + clangDriver + clangFrontend + clangRewriteFrontend + clangStaticAnalyzerFrontend + clangTooling + LLVMFuzzer + ) +endif() \ No newline at end of file -- 2.7.4