Reland "Reland "Prevent accidentally targeting x86""

This is a reland of commit 78e35bd82555c24dcdde644a6c9fbb4a2d353599
After https://chromium-review.googlesource.com/c/chromium/src/+/3582603,
linux-gcc-rel should be fine with the reland.

Original change's description:
> Reland "Prevent accidentally targeting x86"
>
> This is a reland of commit 90af87c0d85c6c1060bd78465eea1a08690ed8cc
> Now allows `use_libfuzzer || !build_with_chromium` on linux,
> and the 32-bit linux main waterfall bot is gone now (see bug).
>
> Original change's description:
> > Prevent accidentally targeting x86
> >
> > I spent a good hour or so today trying to figure out why my build was
> > broken, turns out I just mistyped my target_cpu (should have just gone
> > with the default). A bit of searching shows I'm not the first person to
> > make this mistake, so now hopefully I'll be the last.
> >
> > Change-Id: Id0cad19ef62b16f4e24ea587ed5b95b44f6278bb
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2720708
> > Reviewed-by: Nico Weber <thakis@chromium.org>
> > Commit-Queue: Will Cassella <cassew@google.com>
> > Cr-Commit-Position: refs/heads/master@{#863014}
>
> Bug: 1194538
> Change-Id: I077aec3602cf147fd4e3dd367896ac7f76af463a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3582498
> Reviewed-by: Erik Staab <estaab@chromium.org>
> Commit-Queue: Nico Weber <thakis@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#991108}

Bug: 1194538
Cq-Include-Trybots: luci.chromium.try:linux-gcc-rel
Change-Id: I948bb7c75b045fb57a7c240d388e8eb0db092b23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3583780
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Erik Staab <estaab@chromium.org>
Cr-Commit-Position: refs/heads/main@{#991526}
diff --git a/BUILD.gn b/BUILD.gn
index 7be30ff..6a1fa50 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1516,6 +1516,14 @@
   }
 }
 
+# TODO(cassew): Add more OS's that don't support x86.
+is_valid_x86_target =
+    target_os != "ios" && target_os != "mac" &&
+    (target_os != "linux" || use_libfuzzer || !build_with_chromium)
+assert(
+    is_valid_x86_target || target_cpu != "x86",
+    "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
+
 group("chromium_builder_perf") {
   testonly = true