From: George Karpenkov Date: Mon, 7 Aug 2017 20:56:11 +0000 (+0000) Subject: Do not instrument libFuzzer itself when built with -DLLVM_USE_SANITIZE_COVERAGE X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00e25c5459dc73eafac570509e141186159d47a9;p=platform%2Fupstream%2Fllvm.git Do not instrument libFuzzer itself when built with -DLLVM_USE_SANITIZE_COVERAGE Fixes regression from https://reviews.llvm.org/D36295 Differential Revision: https://reviews.llvm.org/D36428 llvm-svn: 310305 --- diff --git a/llvm/lib/Fuzzer/CMakeLists.txt b/llvm/lib/Fuzzer/CMakeLists.txt index ef05b15..daff0e6 100644 --- a/llvm/lib/Fuzzer/CMakeLists.txt +++ b/llvm/lib/Fuzzer/CMakeLists.txt @@ -24,6 +24,11 @@ endif() set(LIBFUZZER_ENABLE ${LIBFUZZER_ENABLED_CHECK} CACHE BOOL "Build libFuzzer and its tests") set(LIBFUZZER_ENABLE_TESTS OFF CACHE BOOL "Build libFuzzer and its tests") +if (LLVM_USE_SANITIZE_COVERAGE) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -fno-sanitize-coverage=trace-pc-guard,edge,trace-cmp,indirect-calls,8bit-counters -Werror") +endif() + if (LIBFUZZER_ENABLE) add_library(LLVMFuzzerNoMainObjects OBJECT FuzzerCrossOver.cpp