mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[ Tool / Engine ] Cleanup x86 references (#181152)
Fixes https://github.com/flutter/flutter/issues/170142
This commit is contained in:
parent
f1a74f4e8f
commit
b6fa57dd2e
@ -127,10 +127,6 @@ template("android_toolchains_helper") {
|
||||
}
|
||||
}
|
||||
|
||||
android_toolchains_helper("x86") {
|
||||
toolchain_cpu = "x86"
|
||||
}
|
||||
|
||||
android_toolchains_helper("arm") {
|
||||
toolchain_cpu = "arm"
|
||||
}
|
||||
|
||||
@ -13,8 +13,6 @@ namespace flutter {
|
||||
#define kTargetArchitectureName "arm"
|
||||
#elif defined(FML_ARCH_CPU_ARM64)
|
||||
#define kTargetArchitectureName "arm64"
|
||||
#elif defined(FML_ARCH_CPU_X86)
|
||||
#define kTargetArchitectureName "ia32"
|
||||
#elif defined(FML_ARCH_CPU_X86_64)
|
||||
#define kTargetArchitectureName "x64"
|
||||
#elif defined(FML_ARCH_CPU_RISCV32)
|
||||
|
||||
@ -105,50 +105,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"archives": [
|
||||
{
|
||||
"name": "ci/android_debug_x86",
|
||||
"type": "gcs",
|
||||
"base_path": "out/ci/android_debug_x86/zip_archives/",
|
||||
"include_paths": [
|
||||
"out/ci/android_debug_x86/zip_archives/android-x86/artifacts.zip",
|
||||
"out/ci/android_debug_x86/zip_archives/android-x86/android-x86-embedder.zip",
|
||||
"out/ci/android_debug_x86/zip_archives/android-x86/impeller_sdk.zip",
|
||||
"out/ci/android_debug_x86/zip_archives/android-x86/symbols.zip",
|
||||
"out/ci/android_debug_x86/zip_archives/download.flutter.io"
|
||||
],
|
||||
"realm": "production"
|
||||
}
|
||||
],
|
||||
"drone_dimensions": [
|
||||
"device_type=none",
|
||||
"os=Linux"
|
||||
],
|
||||
"gclient_variables": {
|
||||
"use_rbe": true
|
||||
},
|
||||
"gn": [
|
||||
"--target-dir",
|
||||
"ci/android_debug_x86",
|
||||
"--android",
|
||||
"--android-cpu=x86",
|
||||
"--no-lto",
|
||||
"--rbe",
|
||||
"--no-goma"
|
||||
],
|
||||
"name": "ci/android_debug_x86",
|
||||
"description": "Produces debug mode artifacts to target x86 Android from a Linux host.",
|
||||
"ninja": {
|
||||
"config": "ci/android_debug_x86",
|
||||
"targets": [
|
||||
"flutter",
|
||||
"flutter/shell/platform/android:abi_jars",
|
||||
"flutter/shell/platform/embedder:embedder-archive",
|
||||
"flutter/impeller/toolkit/interop:sdk"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"archives": [
|
||||
{
|
||||
|
||||
@ -115,14 +115,7 @@ if (_host_os_name == "mac") {
|
||||
_host_os_name = "windows"
|
||||
}
|
||||
|
||||
# When building 32-bit Android development artifacts for Windows host (like
|
||||
# gen_snapshot), the host_cpu is set to x86. However, the correct prebuilt
|
||||
# Dart SDK to use during this build is still the 64-bit one.
|
||||
_host_cpu = host_cpu
|
||||
if (host_os == "win" && host_cpu == "x86") {
|
||||
_host_cpu = "x64"
|
||||
}
|
||||
|
||||
_target_prebuilt_config = "$_target_os_name-$target_cpu"
|
||||
_host_prebuilt_config = "$_host_os_name-$_host_cpu"
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ The `$FLUTTER_SHA` is the Git hash in the [Flutter repository](https://github.co
|
||||
|:-----:|:------------:|:-----------:|:--------------:|:-------------:|
|
||||
| armv7 | | | android-arm | |
|
||||
| arm64 | darwin-arm64 | linux-arm64 | android-arm64 | windows-arm64 |
|
||||
| x86 | | | android-x86 | |
|
||||
| x64 | darwin-x64 | linux-x64 | android-x64 | windows-x64 |
|
||||
|
||||
|
||||
|
||||
@ -759,51 +759,49 @@ generated_file("android_entitlement_config") {
|
||||
deps = []
|
||||
}
|
||||
|
||||
if (target_cpu != "x86") {
|
||||
zip_bundle("gen_snapshot") {
|
||||
gen_snapshot_out_dir =
|
||||
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
|
||||
"root_out_dir")
|
||||
zip_bundle("gen_snapshot") {
|
||||
gen_snapshot_out_dir =
|
||||
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
|
||||
"root_out_dir")
|
||||
|
||||
# The source gen_snapshot binary from the build outputs.
|
||||
gen_snapshot_src = rebase_path("$gen_snapshot_out_dir/gen_snapshot")
|
||||
# The source gen_snapshot binary from the build outputs.
|
||||
gen_snapshot_src = rebase_path("$gen_snapshot_out_dir/gen_snapshot")
|
||||
|
||||
# The output gen_snapshot binary name in the archive.
|
||||
gen_snapshot_dest = "gen_snapshot"
|
||||
# The output gen_snapshot binary name in the archive.
|
||||
gen_snapshot_dest = "gen_snapshot"
|
||||
|
||||
if (host_os == "mac") {
|
||||
gen_snapshot_src = rebase_path("$root_out_dir/universal/gen_snapshot")
|
||||
} else if (host_os == "win") {
|
||||
gen_snapshot_src = rebase_path("$root_out_dir/gen_snapshot.exe")
|
||||
gen_snapshot_dest = "gen_snapshot.exe"
|
||||
}
|
||||
if (host_os == "mac") {
|
||||
gen_snapshot_src = rebase_path("$root_out_dir/universal/gen_snapshot")
|
||||
} else if (host_os == "win") {
|
||||
gen_snapshot_src = rebase_path("$root_out_dir/gen_snapshot.exe")
|
||||
gen_snapshot_dest = "gen_snapshot.exe"
|
||||
}
|
||||
|
||||
if (host_os == "linux") {
|
||||
output = "$android_zip_archive_dir/linux-x64.zip"
|
||||
} else if (host_os == "mac") {
|
||||
output = "$android_zip_archive_dir/darwin-x64.zip"
|
||||
} else if (host_os == "win") {
|
||||
output = "$android_zip_archive_dir/windows-x64.zip"
|
||||
}
|
||||
if (host_os == "linux") {
|
||||
output = "$android_zip_archive_dir/linux-x64.zip"
|
||||
} else if (host_os == "mac") {
|
||||
output = "$android_zip_archive_dir/darwin-x64.zip"
|
||||
} else if (host_os == "win") {
|
||||
output = "$android_zip_archive_dir/windows-x64.zip"
|
||||
}
|
||||
|
||||
files = [
|
||||
files = [
|
||||
{
|
||||
source = gen_snapshot_src
|
||||
destination = gen_snapshot_dest
|
||||
},
|
||||
]
|
||||
|
||||
deps = [ "//flutter/lib/snapshot:generate_snapshot_bins" ]
|
||||
|
||||
if (host_os == "mac") {
|
||||
deps += [ ":android_entitlement_config" ]
|
||||
files += [
|
||||
{
|
||||
source = gen_snapshot_src
|
||||
destination = gen_snapshot_dest
|
||||
source = "$target_gen_dir/android_entitlements.txt"
|
||||
destination = "entitlements.txt"
|
||||
},
|
||||
]
|
||||
|
||||
deps = [ "//flutter/lib/snapshot:generate_snapshot_bins" ]
|
||||
|
||||
if (host_os == "mac") {
|
||||
deps += [ ":android_entitlement_config" ]
|
||||
files += [
|
||||
{
|
||||
source = "$target_gen_dir/android_entitlements.txt"
|
||||
destination = "entitlements.txt"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -844,10 +842,8 @@ group("android") {
|
||||
":android_javadoc",
|
||||
":android_symbols",
|
||||
":flutter_jar_zip",
|
||||
":gen_snapshot",
|
||||
]
|
||||
if (target_cpu != "x86") {
|
||||
deps += [ ":gen_snapshot" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Renames embedding android artifacts and places them in the final
|
||||
|
||||
@ -232,7 +232,6 @@ final class RunTarget {
|
||||
// -----------------------------------------------------------------------
|
||||
// ANDROID
|
||||
TargetPlatform.androidUnspecified => 'android_$mode',
|
||||
TargetPlatform.androidX86 => 'android_${mode}_x86',
|
||||
TargetPlatform.androidX64 => 'android_${mode}_x64',
|
||||
TargetPlatform.androidArm64 => 'android_${mode}_arm64',
|
||||
TargetPlatform.androidRiscv64 => 'android_${mode}_riscv64',
|
||||
@ -291,7 +290,6 @@ final class RunTarget {
|
||||
// -----------------------------------------------------------------------
|
||||
// ANDROID
|
||||
TargetPlatform.androidUnspecified ||
|
||||
TargetPlatform.androidX86 ||
|
||||
TargetPlatform.androidX64 ||
|
||||
TargetPlatform.androidRiscv64 ||
|
||||
TargetPlatform.androidArm64 => [
|
||||
|
||||
@ -29,9 +29,6 @@ final class TargetPlatform {
|
||||
/// Android x64.
|
||||
static const androidX64 = TargetPlatform._('android-x64');
|
||||
|
||||
/// Android x86.
|
||||
static const androidX86 = TargetPlatform._('android-x86');
|
||||
|
||||
/// Linux ARM64.
|
||||
static const linuxArm64 = TargetPlatform._('linux-arm64');
|
||||
|
||||
@ -92,7 +89,6 @@ final class TargetPlatform {
|
||||
androidArm64,
|
||||
androidRiscv64,
|
||||
androidX64,
|
||||
androidX86,
|
||||
linuxArm64,
|
||||
linuxX64,
|
||||
windowsArm64,
|
||||
|
||||
@ -60,7 +60,6 @@ void main() {
|
||||
group('buildConfigFor', () {
|
||||
final Map<TargetPlatform, String> expectedDebugTargets = {
|
||||
TargetPlatform.androidUnspecified: 'android_debug',
|
||||
TargetPlatform.androidX86: 'android_debug_x86',
|
||||
TargetPlatform.androidX64: 'android_debug_x64',
|
||||
TargetPlatform.androidArm64: 'android_debug_arm64',
|
||||
TargetPlatform.androidRiscv64: 'android_debug_riscv64',
|
||||
@ -98,7 +97,6 @@ void main() {
|
||||
TargetPlatform.androidUnspecified: [
|
||||
Label.parseGn('//flutter/shell/platform/android:android_jar'),
|
||||
],
|
||||
TargetPlatform.androidX86: [Label.parseGn('//flutter/shell/platform/android:android_jar')],
|
||||
TargetPlatform.androidX64: [Label.parseGn('//flutter/shell/platform/android:android_jar')],
|
||||
TargetPlatform.androidArm64: [Label.parseGn('//flutter/shell/platform/android:android_jar')],
|
||||
TargetPlatform.androidRiscv64: [
|
||||
|
||||
@ -137,7 +137,7 @@ class EmulatorManager {
|
||||
error:
|
||||
'No suitable Android AVD system images are available. You may need to install these'
|
||||
' using sdkmanager, for example:\n'
|
||||
' sdkmanager "system-images;android-27;google_apis_playstore;x86"',
|
||||
' sdkmanager "system-images;android-34;google_apis_playstore;x86_64"',
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -891,7 +891,6 @@ const _iosBinaryDirs = <List<String>>[
|
||||
];
|
||||
|
||||
const _androidBinaryDirs = <List<String>>[
|
||||
<String>['android-x86', 'android-x86/artifacts.zip'],
|
||||
<String>['android-x64', 'android-x64/artifacts.zip'],
|
||||
<String>['android-arm', 'android-arm/artifacts.zip'],
|
||||
<String>['android-arm-profile', 'android-arm-profile/artifacts.zip'],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user