Don't use intel clang on arm64 macs (#54291)
Since gen_snapshot is lipo'd everywhere now, it should be safe to both
build with either arm64 or intel macs, and to use the arm64 native clang
toolchain on arm64 macs instead of the intel toolchain under Rosetta.
Related to https://github.com/flutter/flutter/issues/103386
diff --git a/ci/builders/mac_clang_tidy.json b/ci/builders/mac_clang_tidy.json
index c54bf11..b88edcf 100644
--- a/ci/builders/mac_clang_tidy.json
+++ b/ci/builders/mac_clang_tidy.json
@@ -15,7 +15,6 @@
"debug",
"--prebuilt-dart-sdk",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/host_debug_clang_tidy",
"--rbe",
@@ -44,7 +43,6 @@
"debug",
"--simulator",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/ios_debug_sim_clang_tidy",
"--rbe",
@@ -87,7 +85,6 @@
"debug",
"--prebuilt-dart-sdk",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/host_debug_clang_tidy",
"--rbe",
@@ -137,7 +134,6 @@
"debug",
"--prebuilt-dart-sdk",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/host_debug_clang_tidy",
"--rbe",
@@ -187,7 +183,6 @@
"debug",
"--prebuilt-dart-sdk",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/host_debug_clang_tidy",
"--rbe",
@@ -237,7 +232,6 @@
"debug",
"--prebuilt-dart-sdk",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/host_debug_clang_tidy",
"--rbe",
@@ -288,7 +282,6 @@
"debug",
"--prebuilt-dart-sdk",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/host_debug_clang_tidy",
"--rbe",
@@ -306,7 +299,6 @@
"debug",
"--simulator",
"--no-lto",
- "--force-mac-arm64",
"--target-dir",
"ci/ios_debug_sim_clang_tidy",
"--rbe",
diff --git a/ci/builders/mac_ios_engine.json b/ci/builders/mac_ios_engine.json
index 094b005..11d1774 100644
--- a/ci/builders/mac_ios_engine.json
+++ b/ci/builders/mac_ios_engine.json
@@ -3,8 +3,7 @@
{
"drone_dimensions": [
"device_type=none",
- "os=Mac-13|Mac-14",
- "cpu=x86"
+ "os=Mac-13|Mac-14"
],
"gclient_variables": {
"download_android_deps": false,
@@ -231,8 +230,7 @@
{
"drone_dimensions": [
"device_type=none",
- "os=Mac-13|Mac-14",
- "cpu=x86"
+ "os=Mac-13|Mac-14"
],
"gclient_variables": {
"download_android_deps": false,
diff --git a/ci/builders/mac_unopt.json b/ci/builders/mac_unopt.json
index ee6a84b..56cf4c4 100644
--- a/ci/builders/mac_unopt.json
+++ b/ci/builders/mac_unopt.json
@@ -354,7 +354,6 @@
"--unoptimized",
"--no-lto",
"--prebuilt-dart-sdk",
- "--force-mac-arm64",
"--mac-cpu",
"arm64",
"--rbe",
@@ -415,7 +414,6 @@
"debug",
"--simulator",
"--no-lto",
- "--force-mac-arm64",
"--simulator-cpu",
"arm64",
"--rbe",
@@ -483,7 +481,6 @@
"debug",
"--simulator",
"--no-lto",
- "--force-mac-arm64",
"--simulator-cpu",
"arm64",
"--darwin-extension-safe",
diff --git a/tools/gn b/tools/gn
index 3953bec..6936f6e 100755
--- a/tools/gn
+++ b/tools/gn
@@ -502,11 +502,6 @@
gn_args['host_cpu'] = 'x86'
gn_args['current_cpu'] = 'x86'
- # TODO(cbracken):
- # https://github.com/flutter/flutter/issues/103386
- if gn_args['target_os'] == 'ios' and not args.force_mac_arm64:
- gn_args['host_cpu'] = 'x64'
-
if gn_args['target_os'] == 'ios' or get_host_os() == 'mac':
if gn_args['target_os'] == 'ios':
gn_args['use_ios_simulator'] = args.simulator
@@ -917,13 +912,6 @@
parser.add_argument('--ios', dest='target_os', action='store_const', const='ios')
parser.add_argument('--mac', dest='target_os', action='store_const', const='mac')
parser.add_argument('--mac-cpu', type=str, choices=['x64', 'arm64'], default='x64')
- parser.add_argument(
- '--force-mac-arm64',
- action='store_true',
- default=False,
- help='Force use of the clang_arm64 toolchain on an arm64 mac host when '
- 'building host binaries.'
- )
parser.add_argument('--simulator', action='store_true', default=False)
parser.add_argument('--linux', dest='target_os', action='store_const', const='linux')
parser.add_argument('--fuchsia', dest='target_os', action='store_const', const='fuchsia')