Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Donaldson <afdx@google.com>2021-09-03 01:55:30 +0300
committerGitHub <noreply@github.com>2021-09-03 01:55:30 +0300
commit789de0dc4bc952c8b21c5d6c5ed5cc8656b1e135 (patch)
tree6353540c28475bda40d474657275e7a347bf5153 /CMakeLists.txt
parent0c09258e073bdbae19d2de8386125b35b783928b (diff)
Adjust build for fuzzer targets to support OSS-Fuzz (#4498)
With OSS-Fuzz, the build system should not directly set options such as -fsanitize=fuzzer. Instead, these are set by OSS-Fuzz, and linker options are provided via the LIB_FUZZER_OPTIONS environment variable. This change allows the fuzzers to be build stand-alone, outside of OSS-Fuzz, in the way that was already supported, as well as inside OSS-Fuzz, when the LIB_FUZZER_OPTIONS environment variable is set.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 05c1876b8..01e3b16f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,6 +84,8 @@ endif(SPIRV_BUILD_COMPRESSION)
option(SPIRV_BUILD_FUZZER "Build spirv-fuzz" OFF)
+set(SPIRV_LIB_FUZZING_ENGINE_LINK_OPTIONS "" CACHE STRING "Used by OSS-Fuzz to control, via link options, which fuzzing engine should be used")
+
option(SPIRV_BUILD_LIBFUZZER_TARGETS "Build libFuzzer targets" OFF)
option(SPIRV_WERROR "Enable error on warning" ON)