[llvm] r310305 - Do not instrument libFuzzer itself when built with -DLLVM_USE_SANITIZE_COVERAGE
George Karpenkov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 13:56:11 PDT 2017
Author: george.karpenkov
Date: Mon Aug 7 13:56:11 2017
New Revision: 310305
URL: http://llvm.org/viewvc/llvm-project?rev=310305&view=rev
Log:
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
Modified:
llvm/trunk/lib/Fuzzer/CMakeLists.txt
Modified: llvm/trunk/lib/Fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/CMakeLists.txt?rev=310305&r1=310304&r2=310305&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/CMakeLists.txt (original)
+++ llvm/trunk/lib/Fuzzer/CMakeLists.txt Mon Aug 7 13:56:11 2017
@@ -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
More information about the llvm-commits
mailing list