Add support for Android x86_64 ABI to Flutter (#42401)
This commit is contained in:
@@ -327,6 +327,7 @@ class AOTSnapshotter {
|
||||
return const <TargetPlatform>[
|
||||
TargetPlatform.android_arm,
|
||||
TargetPlatform.android_arm64,
|
||||
TargetPlatform.android_x64,
|
||||
TargetPlatform.ios,
|
||||
TargetPlatform.darwin_x64,
|
||||
].contains(platform);
|
||||
|
||||
@@ -90,6 +90,7 @@ class AndroidBuildInfo {
|
||||
this.targetArchs = const <AndroidArch>[
|
||||
AndroidArch.armeabi_v7a,
|
||||
AndroidArch.arm64_v8a,
|
||||
AndroidArch.x86_64,
|
||||
],
|
||||
this.splitPerAbi = false,
|
||||
this.shrink = false,
|
||||
|
||||
@@ -1193,6 +1193,8 @@ const List<List<String>> _osxBinaryDirs = <List<String>>[
|
||||
<String>['android-arm-release/darwin-x64', 'android-arm-release/darwin-x64.zip'],
|
||||
<String>['android-arm64-profile/darwin-x64', 'android-arm64-profile/darwin-x64.zip'],
|
||||
<String>['android-arm64-release/darwin-x64', 'android-arm64-release/darwin-x64.zip'],
|
||||
<String>['android-x64-profile/darwin-x64', 'android-x64-profile/darwin-x64.zip'],
|
||||
<String>['android-x64-release/darwin-x64', 'android-x64-release/darwin-x64.zip'],
|
||||
];
|
||||
|
||||
const List<List<String>> _linuxBinaryDirs = <List<String>>[
|
||||
@@ -1200,6 +1202,7 @@ const List<List<String>> _linuxBinaryDirs = <List<String>>[
|
||||
<String>['android-arm-release/linux-x64', 'android-arm-release/linux-x64.zip'],
|
||||
<String>['android-arm64-profile/linux-x64', 'android-arm64-profile/linux-x64.zip'],
|
||||
<String>['android-arm64-release/linux-x64', 'android-arm64-release/linux-x64.zip'],
|
||||
<String>['android-x64-profile/linux-x64', 'android-x64-profile/linux-x64.zip'],
|
||||
<String>['android-x64-release/linux-x64', 'android-x64-release/linux-x64.zip'],
|
||||
];
|
||||
|
||||
@@ -1208,6 +1211,8 @@ const List<List<String>> _windowsBinaryDirs = <List<String>>[
|
||||
<String>['android-arm-release/windows-x64', 'android-arm-release/windows-x64.zip'],
|
||||
<String>['android-arm64-profile/windows-x64', 'android-arm64-profile/windows-x64.zip'],
|
||||
<String>['android-arm64-release/windows-x64', 'android-arm64-release/windows-x64.zip'],
|
||||
<String>['android-x64-profile/windows-x64', 'android-x64-profile/windows-x64.zip'],
|
||||
<String>['android-x64-release/windows-x64', 'android-x64-release/windows-x64.zip'],
|
||||
];
|
||||
|
||||
const List<List<String>> _iosBinaryDirs = <List<String>>[
|
||||
|
||||
@@ -20,7 +20,7 @@ class BuildAarCommand extends BuildSubCommand {
|
||||
argParser
|
||||
..addMultiOption('target-platform',
|
||||
splitCommas: true,
|
||||
defaultsTo: <String>['android-arm', 'android-arm64'],
|
||||
defaultsTo: <String>['android-arm', 'android-arm64', 'android-x64'],
|
||||
allowed: <String>['android-arm', 'android-arm64', 'android-x86', 'android-x64'],
|
||||
help: 'The target platform for which the project is compiled.',
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
|
||||
..addOption('output-dir', defaultsTo: getAotBuildDirectory())
|
||||
..addOption('target-platform',
|
||||
defaultsTo: 'android-arm',
|
||||
allowed: <String>['android-arm', 'android-arm64', 'ios'],
|
||||
allowed: <String>['android-arm', 'android-arm64', 'ios', 'android-x64'],
|
||||
)
|
||||
..addFlag('quiet', defaultsTo: false)
|
||||
..addFlag('report-timings',
|
||||
|
||||
@@ -31,7 +31,7 @@ class BuildApkCommand extends BuildSubCommand {
|
||||
)
|
||||
..addMultiOption('target-platform',
|
||||
splitCommas: true,
|
||||
defaultsTo: <String>['android-arm', 'android-arm64'],
|
||||
defaultsTo: <String>['android-arm', 'android-arm64', 'android-x64'],
|
||||
allowed: <String>['android-arm', 'android-arm64', 'android-x86', 'android-x64'],
|
||||
help: 'The target platform for which the app is compiled.',
|
||||
);
|
||||
|
||||
@@ -25,8 +25,8 @@ class BuildAppBundleCommand extends BuildSubCommand {
|
||||
..addFlag('track-widget-creation', negatable: false, hide: !verboseHelp)
|
||||
..addMultiOption('target-platform',
|
||||
splitCommas: true,
|
||||
defaultsTo: <String>['android-arm', 'android-arm64'],
|
||||
allowed: <String>['android-arm', 'android-arm64'],
|
||||
defaultsTo: <String>['android-arm', 'android-arm64', 'android-x64'],
|
||||
allowed: <String>['android-arm', 'android-arm64', 'android-x64'],
|
||||
help: 'The target platform for which the app is compiled.',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1267,7 +1267,7 @@ plugin2=${plugin2.path}
|
||||
'-Pflutter-root=$flutterRoot',
|
||||
'-Poutput-dir=${buildDirectory.path}',
|
||||
'-Pis-plugin=true',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'assembleAarRelease',
|
||||
],
|
||||
environment: anyNamed('environment'),
|
||||
@@ -1281,7 +1281,7 @@ plugin2=${plugin2.path}
|
||||
'-Pflutter-root=$flutterRoot',
|
||||
'-Poutput-dir=${buildDirectory.path}',
|
||||
'-Pis-plugin=true',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'assembleAarRelease',
|
||||
],
|
||||
environment: anyNamed('environment'),
|
||||
|
||||
@@ -42,7 +42,7 @@ void main() {
|
||||
final BuildApkCommand command = await runBuildApkCommand(projectPath);
|
||||
|
||||
expect(await command.usageValues,
|
||||
containsPair(CustomDimensions.commandBuildApkTargetPlatform, 'android-arm,android-arm64'));
|
||||
containsPair(CustomDimensions.commandBuildApkTargetPlatform, 'android-arm,android-arm64,android-x64'));
|
||||
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
@@ -209,7 +209,7 @@ flutter:
|
||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||
'-Ptrack-widget-creation=false',
|
||||
'-Pshrink=true',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'assembleRelease',
|
||||
],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
@@ -241,7 +241,7 @@ flutter:
|
||||
'-q',
|
||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||
'-Ptrack-widget-creation=false',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'assembleRelease',
|
||||
],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
@@ -267,7 +267,7 @@ flutter:
|
||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||
'-Ptrack-widget-creation=false',
|
||||
'-Pshrink=true',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'assembleRelease',
|
||||
],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
|
||||
@@ -42,7 +42,7 @@ void main() {
|
||||
final BuildAppBundleCommand command = await runBuildAppBundleCommand(projectPath);
|
||||
|
||||
expect(await command.usageValues,
|
||||
containsPair(CustomDimensions.commandBuildAppBundleTargetPlatform, 'android-arm,android-arm64'));
|
||||
containsPair(CustomDimensions.commandBuildAppBundleTargetPlatform, 'android-arm,android-arm64,android-x64'));
|
||||
|
||||
}, overrides: <Type, Generator>{
|
||||
AndroidBuilder: () => FakeAndroidBuilder(),
|
||||
@@ -198,7 +198,7 @@ flutter:
|
||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||
'-Ptrack-widget-creation=false',
|
||||
'-Pshrink=true',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'bundleRelease',
|
||||
],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
@@ -232,7 +232,7 @@ flutter:
|
||||
'-q',
|
||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||
'-Ptrack-widget-creation=false',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'bundleRelease',
|
||||
],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
@@ -258,7 +258,7 @@ flutter:
|
||||
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
|
||||
'-Ptrack-widget-creation=false',
|
||||
'-Pshrink=true',
|
||||
'-Ptarget-platform=android-arm,android-arm64',
|
||||
'-Ptarget-platform=android-arm,android-arm64,android-x64',
|
||||
'bundleRelease',
|
||||
],
|
||||
workingDirectory: anyNamed('workingDirectory'),
|
||||
|
||||
Reference in New Issue
Block a user