Add an option to build libFuzzer from DEPS.
The bots will need to get libFuzzer externally. As usual, borrow
Chromium's copy.
Change-Id: I5ed879bbc76188838adcf9d51855e76c481ace5b
Reviewed-on: https://boringssl-review.googlesource.com/16146
Reviewed-by: Steven Valdez <svaldez@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c421e88..7c23f0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -277,6 +277,14 @@
add_subdirectory(decrepit)
if(FUZZ)
+ if(LIBFUZZER_FROM_DEPS)
+ file(GLOB LIBFUZZER_SOURCES "util/bot/libFuzzer/*.cpp")
+ add_library(Fuzzer STATIC ${LIBFUZZER_SOURCES})
+ # libFuzzer does not pass our aggressive warnings. It also must be built
+ # without -fsanitize-coverage options or clang crashes.
+ set_target_properties(Fuzzer PROPERTIES COMPILE_FLAGS "-Wno-shadow -Wno-format-nonliteral -fsanitize-coverage=0")
+ endif()
+
add_subdirectory(fuzz)
endif()