Set correct ASAN flags for SPIRV-cross fuzzers

These fuzzers currently depend on being able to change the signal
handler at runtime, but the default flags being used forbid this. This
CL overrides the upstream default to allow changing the handler.

BUG=chromium:904725,chromium:904712

Change-Id: I68423564981b7f2e39f7c00744b92da982cf19e9
Reviewed-on: https://dawn-review.googlesource.com/c/2361
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/fuzzers/BUILD.gn b/src/fuzzers/BUILD.gn
index 9680d6e..23e8de0 100644
--- a/src/fuzzers/BUILD.gn
+++ b/src/fuzzers/BUILD.gn
@@ -42,6 +42,7 @@
     test(target_name) {
       forward_variables_from(invoker,
                              [
+                               "asan_options",
                                "cflags",
                                "cflags_cc",
                                "check_includes",
@@ -51,6 +52,10 @@
                                "sources",
                              ])
 
+      if (defined(asan_options)) {
+        not_needed([ "asan_options" ])
+      }
+
       if (!defined(configs)) {
         configs = []
       }
@@ -75,6 +80,8 @@
   ]
 }
 
+# TODO(rharrison): Remove asan_options once signal trap is no longer
+#                  needed.
 # Uses Dawn specific options and varies input data
 dawn_fuzzer_test("dawn_spirv_cross_glsl_fast_fuzzer") {
   sources = [
@@ -83,9 +90,12 @@
   deps = [
     ":dawn_spirv_cross_fuzzer_common",
   ]
+  asan_options = [ "allow_user_segv_handler=1" ]
 }
 
-# Varies bother the options and input data
+# TODO(rharrison): Remove asan_options once signal trap is no longer
+#                  needed.
+# Varies both the options and input data
 dawn_fuzzer_test("dawn_spirv_cross_glsl_full_fuzzer") {
   sources = [
     "DawnSPIRVCrossGLSLFullFuzzer.cpp",
@@ -93,8 +103,11 @@
   deps = [
     ":dawn_spirv_cross_fuzzer_common",
   ]
+  asan_options = [ "allow_user_segv_handler=1" ]
 }
 
+# TODO(rharrison): Remove asan_options once signal trap is no longer
+#                  needed.
 # Uses Dawn specific options and varies input data
 dawn_fuzzer_test("dawn_spirv_cross_hlsl_fast_fuzzer") {
   sources = [
@@ -103,9 +116,12 @@
   deps = [
     ":dawn_spirv_cross_fuzzer_common",
   ]
+  asan_options = [ "allow_user_segv_handler=1" ]
 }
 
-# Varies bother the options and input data
+# TODO(rharrison): Remove asan_options once signal trap is no longer
+#                  needed.
+# Varies both the options and input data
 dawn_fuzzer_test("dawn_spirv_cross_hlsl_full_fuzzer") {
   sources = [
     "DawnSPIRVCrossGLSLFullFuzzer.cpp",
@@ -113,8 +129,11 @@
   deps = [
     ":dawn_spirv_cross_fuzzer_common",
   ]
+  asan_options = [ "allow_user_segv_handler=1" ]
 }
 
+# TODO(rharrison): Remove asan_options once signal trap is no longer
+#                  needed.
 # Uses Dawn specific options and varies input data
 dawn_fuzzer_test("dawn_spirv_cross_msl_fast_fuzzer") {
   sources = [
@@ -123,9 +142,12 @@
   deps = [
     ":dawn_spirv_cross_fuzzer_common",
   ]
+  asan_options = [ "allow_user_segv_handler=1" ]
 }
 
-# Varies bother the options and input data
+# TODO(rharrison): Remove asan_options once signal trap is no longer
+#                  needed.
+# Varies both the options and input data
 dawn_fuzzer_test("dawn_spirv_cross_msl_full_fuzzer") {
   sources = [
     "DawnSPIRVCrossGLSLFullFuzzer.cpp",
@@ -133,6 +155,7 @@
   deps = [
     ":dawn_spirv_cross_fuzzer_common",
   ]
+  asan_options = [ "allow_user_segv_handler=1" ]
 }
 
 dawn_fuzzer_test("dawn_wire_server_and_frontend_fuzzer") {