Remove --build-mac-arm flags

Now that mac arm toolchain builds always run on arm hosts. --build-mac-arm was only used for building arm toolchains on x64 hosts.

https://crrev.com/c/5840062?checksPatchset=1&tab=checks shows that the mac tryjobs work (rust fails due to unrelated issues).

Bug: 40270881
Change-Id: I938f92f5b717ec079a824ccaebd2f504b6ce9a10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5840062
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1351739}
NOKEYCHECK=True
GitOrigin-RevId: 0320aed12e8ae80d26cbd0917cd1c8ee1d527399
diff --git a/build_crubit.py b/build_crubit.py
index 798f395..bd6f912 100755
--- a/build_crubit.py
+++ b/build_crubit.py
@@ -38,9 +38,9 @@
 CRUBIT_SRC_DIR = os.path.join(THIRD_PARTY_DIR, 'crubit', 'src')
 
 
-def BazelExe(build_mac_arm):
+def BazelExe():
     if sys.platform == 'darwin':
-        if build_mac_arm or platform.machine() == 'arm64':
+        if platform.machine() == 'arm64':
             return os.path.join(BAZEL_DIR, 'mac-arm64', 'bazel')
         else:
             return os.path.join(BAZEL_DIR, 'mac-amd64', 'bazel')
@@ -94,7 +94,7 @@
     sys.exit(1)
 
 
-def BuildCrubit(build_mac_arm):
+def BuildCrubit():
     # TODO(crbug.com/40229251): Use locally built Rust instead of having
     # Bazel always download the whole Rust toolchain from the internet.
 
@@ -131,8 +131,7 @@
 
     # Run bazel build ...
     args = [
-        BazelExe(build_mac_arm), "build",
-        "rs_bindings_from_cc:rs_bindings_from_cc_impl"
+        BazelExe(), "build", "rs_bindings_from_cc:rs_bindings_from_cc_impl"
     ]
     RunCommand(args + extra_args, env=env, cwd=CRUBIT_SRC_DIR)
 
@@ -153,13 +152,12 @@
              stat.S_IRWXU | stat.S_IRWXG | stat.S_IROTH | stat.S_IXOTH)
 
 
-def CleanBazel(build_mac_arm):
-    RunCommand([BazelExe(build_mac_arm), "clean", "--expunge"],
-               cwd=CRUBIT_SRC_DIR)
+def CleanBazel():
+    RunCommand([BazelExe(), "clean", "--expunge"], cwd=CRUBIT_SRC_DIR)
 
 
-def ShutdownBazel(build_mac_arm):
-    RunCommand([BazelExe(build_mac_arm), "shutdown"], cwd=CRUBIT_SRC_DIR)
+def ShutdownBazel():
+    RunCommand([BazelExe(), "shutdown"], cwd=CRUBIT_SRC_DIR)
 
 
 def WritableDir(d):
@@ -196,31 +194,21 @@
         '--skip-checkout',
         action='store_true',
         help='skip Crubit git checkout. Useful for trying local changes')
-    parser.add_argument('--build-mac-arm',
-                        action='store_true',
-                        help='Build arm binaries. Only valid on macOS.')
     args, rest = parser.parse_known_args()
 
-    if args.build_mac_arm and sys.platform != 'darwin':
-        print('--build-mac-arm only valid on macOS')
-        return 1
-    if args.build_mac_arm and platform.machine() == 'arm64':
-        print('--build-mac-arm only valid on intel to cross-build arm')
-        return 1
-
     if not args.skip_checkout:
         CheckoutCrubit(CRUBIT_REVISION, CRUBIT_SRC_DIR)
 
     try:
         if not args.skip_clean:
-            CleanBazel(args.build_mac_arm)
+            CleanBazel()
 
-        BuildCrubit(args.build_mac_arm)
+        BuildCrubit()
 
         if args.install_to:
             InstallCrubit(args.install_to)
     finally:
-        ShutdownBazel(args.build_mac_arm)
+        ShutdownBazel()
 
     return 0
 
diff --git a/package_rust.py b/package_rust.py
index b6ef402..b8a8da5 100755
--- a/package_rust.py
+++ b/package_rust.py
@@ -29,13 +29,11 @@
 # TODO(crbug.com/40226863): Use this function (after integrating Crubit
 # into Chromium; this work is on hold right now - see also
 # https://crbug.com/1510943#c2).
-def BuildCrubit(build_mac_arm):
+def BuildCrubit():
     with open(os.path.join(THIRD_PARTY_DIR, BUILDLOG_NAME),
               'w',
               encoding='utf-8') as log:
         build_cmd = [sys.executable, os.path.join(THIS_DIR, 'build_crubit.py')]
-        if build_mac_arm:
-            build_cmd.append('--build-mac-arm')
         # TODO(crbug.com/40226863): Default to `fail_hard` once we
         # actually depend on the build step (i.e. once we start packaging
         # Crubit).
@@ -57,23 +55,11 @@
         default=DEFAULT_GCS_BUCKET,
         help='Google Cloud Storage bucket where the target archive is uploaded'
     )
-    parser.add_argument('--build-mac-arm',
-                        action='store_true',
-                        help='Build arm binaries. Only valid on macOS.')
     args = parser.parse_args()
 
-    if args.build_mac_arm and sys.platform != 'darwin':
-        print('--build-mac-arm only valid on macOS')
-        return 1
-    if args.build_mac_arm and platform.machine() == 'arm64':
-        print('--build-mac-arm only valid on intel to cross-build arm')
-        return 1
-
     # The gcs_platform logic copied from `//tools/clang/scripts/upload.sh`.
     if sys.platform == 'darwin':
-        # The --build-mac-intel switch can be used to force the Mac build to
-        # target arm64.
-        if args.build_mac_arm or platform.machine() == 'arm64':
+        if platform.machine() == 'arm64':
             gcs_platform = 'Mac_arm64'
         else:
             gcs_platform = 'Mac'
@@ -91,8 +77,6 @@
               encoding='utf-8') as log:
         # Build the Rust toolchain.
         build_cmd = [sys.executable, os.path.join(THIS_DIR, 'build_rust.py')]
-        if args.build_mac_arm:
-            build_cmd.append('--build-mac-arm')
         TeeCmd(build_cmd, log)
 
         # Build bindgen.
@@ -100,8 +84,6 @@
             sys.executable,
             os.path.join(THIS_DIR, 'build_bindgen.py')
         ]
-        if args.build_mac_arm:
-            build_cmd.append('--build-mac-arm')
         TeeCmd(build_cmd, log)
 
         # Build cargo-vet.