summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2017-07-12 18:16:09 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2017-07-12 18:16:09 +0000
commitcf26a86601ec358e56f220d908e25c36fc953bb6 (patch)
tree88fc38b7039aeaa64febdb84e3aa3017132f9636 /llvm
parent6eab75fbb0f870262544eaca7db4931156d733a5 (diff)
downloadbcm5719-llvm-cf26a86601ec358e56f220d908e25c36fc953bb6.tar.gz
bcm5719-llvm-cf26a86601ec358e56f220d908e25c36fc953bb6.zip
[libFuzzer] NFC Declare LIBFUZZER_FLAGS_BASE outside of an if-block
The current code relies on the assumption that tests are included only if LLVM_USE_SANITIZE_COVERAGE is enabled. This commit makes it easier to relax the assumption in the future, as the variable LIBFUZZER_FLAGS_BASE is used further in libFuzzer tests. Differential Revision: https://reviews.llvm.org/D35314 llvm-svn: 307825
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Fuzzer/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/CMakeLists.txt b/llvm/lib/Fuzzer/CMakeLists.txt
index b886021aee3..fa743c280e8 100644
--- a/llvm/lib/Fuzzer/CMakeLists.txt
+++ b/llvm/lib/Fuzzer/CMakeLists.txt
@@ -13,6 +13,7 @@ if( APPLE )
endif()
endif()
+set(LIBFUZZER_FLAGS_BASE "${CMAKE_CXX_FLAGS}")
if( LLVM_USE_SANITIZE_COVERAGE )
if(NOT "${LLVM_USE_SANITIZER}" STREQUAL "Address")
message(FATAL_ERROR
@@ -20,7 +21,6 @@ if( LLVM_USE_SANITIZE_COVERAGE )
"LLVM_USE_SANITIZE_COVERAGE=YES to be set."
)
endif()
- set(LIBFUZZER_FLAGS_BASE "${CMAKE_CXX_FLAGS}")
# Disable the coverage and sanitizer instrumentation for the fuzzer itself.
set(CMAKE_CXX_FLAGS "${LIBFUZZER_FLAGS_BASE} -fno-sanitize-coverage=trace-pc-guard,edge,trace-cmp,indirect-calls,8bit-counters -Werror")
OpenPOWER on IntegriCloud