[PATCH] D20662: [LibFuzzer] Emit error during configuration if LLVM_USE_SANITIZER is not correctly set.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 22:16:14 PDT 2016
delcypher created this revision.
delcypher added reviewers: kcc, aizatsky.
delcypher added subscribers: kcc, aizatsky, zaks.anna, llvm-commits.
[LibFuzzer] Emit error during configuration if LLVM_USE_SANITIZER is not correctly set.
Previously CMake would successfully configure and compile (with warnings
about ``-fsanitize-coverage=...`` being unused) but the tests LibFuzzer
tests would fail.
This patch is dependent on http://reviews.llvm.org/D20558
http://reviews.llvm.org/D20662
Files:
lib/Fuzzer/CMakeLists.txt
Index: lib/Fuzzer/CMakeLists.txt
===================================================================
--- lib/Fuzzer/CMakeLists.txt
+++ lib/Fuzzer/CMakeLists.txt
@@ -2,6 +2,12 @@
# Disable the coverage and sanitizer instrumentation for the fuzzer itself.
set(CMAKE_CXX_FLAGS "${LIBFUZZER_FLAGS_BASE} -fno-sanitize=all -fno-sanitize-coverage=edge,trace-cmp,indirect-calls,8bit-counters -Werror")
if( LLVM_USE_SANITIZE_COVERAGE )
+ if(NOT "${LLVM_USE_SANITIZER}" STREQUAL "Address")
+ message(FATAL_ERROR
+ "LLVM_USE_SANITIZER must be set to Address"
+ " to build LibFuzzer"
+ )
+ endif()
add_library(LLVMFuzzerNoMainObjects OBJECT
FuzzerCrossOver.cpp
FuzzerTraceState.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20662.58567.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/93e71ace/attachment.bin>
More information about the llvm-commits
mailing list