[build] Include trap handler files in iOS simulator builds

iOS simulator builds have x64 as the target architecture. This extends
BUILD.gn to properly include trap handler files in this case.

Bug: v8:9140
Change-Id: If6e90a720effdebe8b1f4e4e37eb8b3a3dbae20e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1570022
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60901}
diff --git a/BUILD.gn b/BUILD.gn
index c5a840d..18741e7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -2977,7 +2977,9 @@
       "src/x64/register-x64.h",
       "src/x64/sse-instr.h",
     ]
-    if (is_linux || is_mac) {
+    # iOS Xcode simulator builds run on an x64 target. iOS and macOS are both
+    # based on Darwin and thus POSIX-compliant to a similar degree.
+    if (is_linux || is_mac || is_ios) {
       sources += [
         "src/trap-handler/handler-inside-posix.cc",
         "src/trap-handler/handler-inside-posix.h",