Skip to content

Commit b6fa57d

Browse files
authored
[ Tool / Engine ] Cleanup x86 references (flutter#181152)
Fixes flutter#170142
1 parent f1a74f4 commit b6fa57d

11 files changed

Lines changed: 37 additions & 108 deletions

File tree

engine/src/build/toolchain/android/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ template("android_toolchains_helper") {
127127
}
128128
}
129129

130-
android_toolchains_helper("x86") {
131-
toolchain_cpu = "x86"
132-
}
133-
134130
android_toolchains_helper("arm") {
135131
toolchain_cpu = "arm"
136132
}

engine/src/flutter/assets/native_assets.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ namespace flutter {
1313
#define kTargetArchitectureName "arm"
1414
#elif defined(FML_ARCH_CPU_ARM64)
1515
#define kTargetArchitectureName "arm64"
16-
#elif defined(FML_ARCH_CPU_X86)
17-
#define kTargetArchitectureName "ia32"
1816
#elif defined(FML_ARCH_CPU_X86_64)
1917
#define kTargetArchitectureName "x64"
2018
#elif defined(FML_ARCH_CPU_RISCV32)

engine/src/flutter/ci/builders/linux_android_debug_engine.json

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -105,50 +105,6 @@
105105
]
106106
}
107107
},
108-
{
109-
"archives": [
110-
{
111-
"name": "ci/android_debug_x86",
112-
"type": "gcs",
113-
"base_path": "out/ci/android_debug_x86/zip_archives/",
114-
"include_paths": [
115-
"out/ci/android_debug_x86/zip_archives/android-x86/artifacts.zip",
116-
"out/ci/android_debug_x86/zip_archives/android-x86/android-x86-embedder.zip",
117-
"out/ci/android_debug_x86/zip_archives/android-x86/impeller_sdk.zip",
118-
"out/ci/android_debug_x86/zip_archives/android-x86/symbols.zip",
119-
"out/ci/android_debug_x86/zip_archives/download.flutter.io"
120-
],
121-
"realm": "production"
122-
}
123-
],
124-
"drone_dimensions": [
125-
"device_type=none",
126-
"os=Linux"
127-
],
128-
"gclient_variables": {
129-
"use_rbe": true
130-
},
131-
"gn": [
132-
"--target-dir",
133-
"ci/android_debug_x86",
134-
"--android",
135-
"--android-cpu=x86",
136-
"--no-lto",
137-
"--rbe",
138-
"--no-goma"
139-
],
140-
"name": "ci/android_debug_x86",
141-
"description": "Produces debug mode artifacts to target x86 Android from a Linux host.",
142-
"ninja": {
143-
"config": "ci/android_debug_x86",
144-
"targets": [
145-
"flutter",
146-
"flutter/shell/platform/android:abi_jars",
147-
"flutter/shell/platform/embedder:embedder-archive",
148-
"flutter/impeller/toolkit/interop:sdk"
149-
]
150-
}
151-
},
152108
{
153109
"archives": [
154110
{

engine/src/flutter/common/config.gni

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,7 @@ if (_host_os_name == "mac") {
115115
_host_os_name = "windows"
116116
}
117117

118-
# When building 32-bit Android development artifacts for Windows host (like
119-
# gen_snapshot), the host_cpu is set to x86. However, the correct prebuilt
120-
# Dart SDK to use during this build is still the 64-bit one.
121118
_host_cpu = host_cpu
122-
if (host_os == "win" && host_cpu == "x86") {
123-
_host_cpu = "x64"
124-
}
125-
126119
_target_prebuilt_config = "$_target_os_name-$target_cpu"
127120
_host_prebuilt_config = "$_host_os_name-$_host_cpu"
128121

engine/src/flutter/impeller/toolkit/interop/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ The `$FLUTTER_SHA` is the Git hash in the [Flutter repository](https://github.co
3636
|:-----:|:------------:|:-----------:|:--------------:|:-------------:|
3737
| armv7 | | | android-arm | |
3838
| arm64 | darwin-arm64 | linux-arm64 | android-arm64 | windows-arm64 |
39-
| x86 | | | android-x86 | |
4039
| x64 | darwin-x64 | linux-x64 | android-x64 | windows-x64 |
4140

4241

engine/src/flutter/shell/platform/android/BUILD.gn

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -759,51 +759,49 @@ generated_file("android_entitlement_config") {
759759
deps = []
760760
}
761761

762-
if (target_cpu != "x86") {
763-
zip_bundle("gen_snapshot") {
764-
gen_snapshot_out_dir =
765-
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
766-
"root_out_dir")
762+
zip_bundle("gen_snapshot") {
763+
gen_snapshot_out_dir =
764+
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
765+
"root_out_dir")
767766

768-
# The source gen_snapshot binary from the build outputs.
769-
gen_snapshot_src = rebase_path("$gen_snapshot_out_dir/gen_snapshot")
767+
# The source gen_snapshot binary from the build outputs.
768+
gen_snapshot_src = rebase_path("$gen_snapshot_out_dir/gen_snapshot")
770769

771-
# The output gen_snapshot binary name in the archive.
772-
gen_snapshot_dest = "gen_snapshot"
770+
# The output gen_snapshot binary name in the archive.
771+
gen_snapshot_dest = "gen_snapshot"
773772

774-
if (host_os == "mac") {
775-
gen_snapshot_src = rebase_path("$root_out_dir/universal/gen_snapshot")
776-
} else if (host_os == "win") {
777-
gen_snapshot_src = rebase_path("$root_out_dir/gen_snapshot.exe")
778-
gen_snapshot_dest = "gen_snapshot.exe"
779-
}
773+
if (host_os == "mac") {
774+
gen_snapshot_src = rebase_path("$root_out_dir/universal/gen_snapshot")
775+
} else if (host_os == "win") {
776+
gen_snapshot_src = rebase_path("$root_out_dir/gen_snapshot.exe")
777+
gen_snapshot_dest = "gen_snapshot.exe"
778+
}
780779

781-
if (host_os == "linux") {
782-
output = "$android_zip_archive_dir/linux-x64.zip"
783-
} else if (host_os == "mac") {
784-
output = "$android_zip_archive_dir/darwin-x64.zip"
785-
} else if (host_os == "win") {
786-
output = "$android_zip_archive_dir/windows-x64.zip"
787-
}
780+
if (host_os == "linux") {
781+
output = "$android_zip_archive_dir/linux-x64.zip"
782+
} else if (host_os == "mac") {
783+
output = "$android_zip_archive_dir/darwin-x64.zip"
784+
} else if (host_os == "win") {
785+
output = "$android_zip_archive_dir/windows-x64.zip"
786+
}
788787

789-
files = [
788+
files = [
789+
{
790+
source = gen_snapshot_src
791+
destination = gen_snapshot_dest
792+
},
793+
]
794+
795+
deps = [ "//flutter/lib/snapshot:generate_snapshot_bins" ]
796+
797+
if (host_os == "mac") {
798+
deps += [ ":android_entitlement_config" ]
799+
files += [
790800
{
791-
source = gen_snapshot_src
792-
destination = gen_snapshot_dest
801+
source = "$target_gen_dir/android_entitlements.txt"
802+
destination = "entitlements.txt"
793803
},
794804
]
795-
796-
deps = [ "//flutter/lib/snapshot:generate_snapshot_bins" ]
797-
798-
if (host_os == "mac") {
799-
deps += [ ":android_entitlement_config" ]
800-
files += [
801-
{
802-
source = "$target_gen_dir/android_entitlements.txt"
803-
destination = "entitlements.txt"
804-
},
805-
]
806-
}
807805
}
808806
}
809807

@@ -844,10 +842,8 @@ group("android") {
844842
":android_javadoc",
845843
":android_symbols",
846844
":flutter_jar_zip",
845+
":gen_snapshot",
847846
]
848-
if (target_cpu != "x86") {
849-
deps += [ ":gen_snapshot" ]
850-
}
851847
}
852848

853849
# Renames embedding android artifacts and places them in the final

engine/src/flutter/tools/engine_tool/lib/src/commands/run_command.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ final class RunTarget {
232232
// -----------------------------------------------------------------------
233233
// ANDROID
234234
TargetPlatform.androidUnspecified => 'android_$mode',
235-
TargetPlatform.androidX86 => 'android_${mode}_x86',
236235
TargetPlatform.androidX64 => 'android_${mode}_x64',
237236
TargetPlatform.androidArm64 => 'android_${mode}_arm64',
238237
TargetPlatform.androidRiscv64 => 'android_${mode}_riscv64',
@@ -291,7 +290,6 @@ final class RunTarget {
291290
// -----------------------------------------------------------------------
292291
// ANDROID
293292
TargetPlatform.androidUnspecified ||
294-
TargetPlatform.androidX86 ||
295293
TargetPlatform.androidX64 ||
296294
TargetPlatform.androidRiscv64 ||
297295
TargetPlatform.androidArm64 => [

engine/src/flutter/tools/engine_tool/lib/src/flutter_tool_interop/target_platform.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ final class TargetPlatform {
2929
/// Android x64.
3030
static const androidX64 = TargetPlatform._('android-x64');
3131

32-
/// Android x86.
33-
static const androidX86 = TargetPlatform._('android-x86');
34-
3532
/// Linux ARM64.
3633
static const linuxArm64 = TargetPlatform._('linux-arm64');
3734

@@ -92,7 +89,6 @@ final class TargetPlatform {
9289
androidArm64,
9390
androidRiscv64,
9491
androidX64,
95-
androidX86,
9692
linuxArm64,
9793
linuxX64,
9894
windowsArm64,

engine/src/flutter/tools/engine_tool/test/run_target_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ void main() {
6060
group('buildConfigFor', () {
6161
final Map<TargetPlatform, String> expectedDebugTargets = {
6262
TargetPlatform.androidUnspecified: 'android_debug',
63-
TargetPlatform.androidX86: 'android_debug_x86',
6463
TargetPlatform.androidX64: 'android_debug_x64',
6564
TargetPlatform.androidArm64: 'android_debug_arm64',
6665
TargetPlatform.androidRiscv64: 'android_debug_riscv64',
@@ -98,7 +97,6 @@ void main() {
9897
TargetPlatform.androidUnspecified: [
9998
Label.parseGn('//flutter/shell/platform/android:android_jar'),
10099
],
101-
TargetPlatform.androidX86: [Label.parseGn('//flutter/shell/platform/android:android_jar')],
102100
TargetPlatform.androidX64: [Label.parseGn('//flutter/shell/platform/android:android_jar')],
103101
TargetPlatform.androidArm64: [Label.parseGn('//flutter/shell/platform/android:android_jar')],
104102
TargetPlatform.androidRiscv64: [

packages/flutter_tools/lib/src/emulator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class EmulatorManager {
137137
error:
138138
'No suitable Android AVD system images are available. You may need to install these'
139139
' using sdkmanager, for example:\n'
140-
' sdkmanager "system-images;android-27;google_apis_playstore;x86"',
140+
' sdkmanager "system-images;android-34;google_apis_playstore;x86_64"',
141141
);
142142
}
143143

0 commit comments

Comments
 (0)