[fuchsia] Temporarily disable hwasan from crashpad tests

Much of crashpad's unittests propagate tagged pointers to fuchsia
syscalls which do not accept tagged values. Rather than fixing them all
right now, just ensure that the tests do not build with the hwasan
variant if enabled.

Bug: fxbug.dev/108368
Change-Id: Ife7fb86d20829978e9c4d4a8684008dab0741633
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4175438
Reviewed-by: Francois Rousseau <frousseau@google.com>
Commit-Queue: Francois Rousseau <frousseau@google.com>
GitOrigin-RevId: 84627e1ac7b712f06271d9e32e36acbfbb9d9783
diff --git a/BUILD.gn b/BUILD.gn
index a2d92e6..db65cff 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -39,6 +39,8 @@
     if (crashpad_is_in_fuchsia) {
       # TODO(fuchsia:46559): Fix the leaks and remove this.
       deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
+      # TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
+      exclude_toolchain_tags = [ "hwasan" ]
     }
     if (crashpad_is_android) {
       use_raw_android_executable = true
diff --git a/snapshot/BUILD.gn b/snapshot/BUILD.gn
index 09a3f78..9ffdb47 100644
--- a/snapshot/BUILD.gn
+++ b/snapshot/BUILD.gn
@@ -505,6 +505,10 @@
     "$mini_chromium_source_parent:base",
     "../client",
   ]
+  if (crashpad_is_in_fuchsia) {
+    # TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
+    exclude_toolchain_tags = [ "hwasan" ]
+  }
 }
 
 crashpad_loadable_module("crashpad_snapshot_test_module_large") {
@@ -519,6 +523,11 @@
 
   defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE" ]
   deps += [ "$mini_chromium_source_parent:base" ]
+
+  if (crashpad_is_in_fuchsia) {
+    # TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
+    exclude_toolchain_tags = [ "hwasan" ]
+  }
 }
 
 crashpad_loadable_module("crashpad_snapshot_test_module_small") {
@@ -533,6 +542,11 @@
 
   defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL" ]
   deps += [ "$mini_chromium_source_parent:base" ]
+
+  if (crashpad_is_in_fuchsia) {
+    # TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
+    exclude_toolchain_tags = [ "hwasan" ]
+  }
 }
 
 if ((crashpad_is_linux || crashpad_is_android || crashpad_is_fuchsia) &&
@@ -543,6 +557,11 @@
 
     # This makes `ld` emit both .hash and .gnu.hash sections.
     ldflags = [ "-Wl,--hash-style=both" ]
+
+    if (crashpad_is_in_fuchsia) {
+      # TODO(fxbug.dev/108368): Remove this once the underlying issue is addressed.
+      exclude_toolchain_tags = [ "hwasan" ]
+    }
   }
 }