summaryrefslogtreecommitdiffstats
path: root/tools/clang-fuzzer
diff options
context:
space:
mode:
authorMatt Morehouse <mascasa@google.com>2017-08-23 19:58:07 +0000
committerMatt Morehouse <mascasa@google.com>2017-08-23 19:58:07 +0000
commit3a9e3bcddd1c28016ea6d76525083f3ddb743a66 (patch)
tree7be55ea0d6f858c924a0110d978b3dc572265254 /tools/clang-fuzzer
parentda8dca22517ea74afb2c69dae4247388b314cc3b (diff)
[clang-proto-fuzzer] Fix clang-proto-to-cxx build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-fuzzer')
-rw-r--r--tools/clang-fuzzer/CMakeLists.txt1
-rw-r--r--tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt1
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/clang-fuzzer/CMakeLists.txt b/tools/clang-fuzzer/CMakeLists.txt
index 694dd585c2..82c3b0eb02 100644
--- a/tools/clang-fuzzer/CMakeLists.txt
+++ b/tools/clang-fuzzer/CMakeLists.txt
@@ -1,5 +1,6 @@
if( LLVM_USE_SANITIZE_COVERAGE )
set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD})
+ set(CXX_FLAGS_NOFUZZ ${CMAKE_CXX_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
if(CLANG_ENABLE_PROTO_FUZZER)
diff --git a/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt b/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt
index 1c3c504cef..36235a584b 100644
--- a/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt
+++ b/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt
@@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD})
+set(CMAKE_CXX_FLAGS ${CXX_FLAGS_NOFUZZ})
# Hack to bypass LLVM's CMake source checks so we can have both a library and
# an executable built from this directory.