[tint][cmake] Error if building fuzzers without Clang
`-fsanitize=fuzzer` is not understood by other toolchains
Fixed: tint:2005
Change-Id: I9b9f8b1a1b2f9d3b9dbf5c7d2b80e1604de615d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/149684
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index 8e14741..847c675 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -217,6 +217,9 @@
# Fuzzers
################################################################################
if(TINT_BUILD_FUZZERS)
+ if(NOT COMPILER_IS_CLANG)
+ message(FATAL_ERROR "TINT_BUILD_FUZZERS can only be enabled with the Clang toolchain")
+ endif()
add_subdirectory(fuzzers)
set(TINT_FUZZ_SUFFIX "_fuzz")
endif()