Unverified Commit 03a45dc3 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Add support for Android x86_64 ABI to Flutter (#42401)

parent 53636374
...@@ -327,6 +327,7 @@ class AOTSnapshotter { ...@@ -327,6 +327,7 @@ class AOTSnapshotter {
return const <TargetPlatform>[ return const <TargetPlatform>[
TargetPlatform.android_arm, TargetPlatform.android_arm,
TargetPlatform.android_arm64, TargetPlatform.android_arm64,
TargetPlatform.android_x64,
TargetPlatform.ios, TargetPlatform.ios,
TargetPlatform.darwin_x64, TargetPlatform.darwin_x64,
].contains(platform); ].contains(platform);
......
...@@ -90,6 +90,7 @@ class AndroidBuildInfo { ...@@ -90,6 +90,7 @@ class AndroidBuildInfo {
this.targetArchs = const <AndroidArch>[ this.targetArchs = const <AndroidArch>[
AndroidArch.armeabi_v7a, AndroidArch.armeabi_v7a,
AndroidArch.arm64_v8a, AndroidArch.arm64_v8a,
AndroidArch.x86_64,
], ],
this.splitPerAbi = false, this.splitPerAbi = false,
this.shrink = false, this.shrink = false,
......
...@@ -1193,6 +1193,8 @@ const List<List<String>> _osxBinaryDirs = <List<String>>[ ...@@ -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-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-profile/darwin-x64', 'android-arm64-profile/darwin-x64.zip'],
<String>['android-arm64-release/darwin-x64', 'android-arm64-release/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>>[ const List<List<String>> _linuxBinaryDirs = <List<String>>[
...@@ -1200,6 +1202,7 @@ 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-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-profile/linux-x64', 'android-arm64-profile/linux-x64.zip'],
<String>['android-arm64-release/linux-x64', 'android-arm64-release/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'], <String>['android-x64-release/linux-x64', 'android-x64-release/linux-x64.zip'],
]; ];
...@@ -1208,6 +1211,8 @@ const List<List<String>> _windowsBinaryDirs = <List<String>>[ ...@@ -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-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-profile/windows-x64', 'android-arm64-profile/windows-x64.zip'],
<String>['android-arm64-release/windows-x64', 'android-arm64-release/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>>[ const List<List<String>> _iosBinaryDirs = <List<String>>[
......
...@@ -20,7 +20,7 @@ class BuildAarCommand extends BuildSubCommand { ...@@ -20,7 +20,7 @@ class BuildAarCommand extends BuildSubCommand {
argParser argParser
..addMultiOption('target-platform', ..addMultiOption('target-platform',
splitCommas: true, 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'], allowed: <String>['android-arm', 'android-arm64', 'android-x86', 'android-x64'],
help: 'The target platform for which the project is compiled.', help: 'The target platform for which the project is compiled.',
) )
......
...@@ -31,7 +31,7 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen ...@@ -31,7 +31,7 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
..addOption('output-dir', defaultsTo: getAotBuildDirectory()) ..addOption('output-dir', defaultsTo: getAotBuildDirectory())
..addOption('target-platform', ..addOption('target-platform',
defaultsTo: 'android-arm', defaultsTo: 'android-arm',
allowed: <String>['android-arm', 'android-arm64', 'ios'], allowed: <String>['android-arm', 'android-arm64', 'ios', 'android-x64'],
) )
..addFlag('quiet', defaultsTo: false) ..addFlag('quiet', defaultsTo: false)
..addFlag('report-timings', ..addFlag('report-timings',
......
...@@ -31,7 +31,7 @@ class BuildApkCommand extends BuildSubCommand { ...@@ -31,7 +31,7 @@ class BuildApkCommand extends BuildSubCommand {
) )
..addMultiOption('target-platform', ..addMultiOption('target-platform',
splitCommas: true, 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'], allowed: <String>['android-arm', 'android-arm64', 'android-x86', 'android-x64'],
help: 'The target platform for which the app is compiled.', help: 'The target platform for which the app is compiled.',
); );
......
...@@ -25,8 +25,8 @@ class BuildAppBundleCommand extends BuildSubCommand { ...@@ -25,8 +25,8 @@ class BuildAppBundleCommand extends BuildSubCommand {
..addFlag('track-widget-creation', negatable: false, hide: !verboseHelp) ..addFlag('track-widget-creation', negatable: false, hide: !verboseHelp)
..addMultiOption('target-platform', ..addMultiOption('target-platform',
splitCommas: true, splitCommas: true,
defaultsTo: <String>['android-arm', 'android-arm64'], defaultsTo: <String>['android-arm', 'android-arm64', 'android-x64'],
allowed: <String>['android-arm', 'android-arm64'], allowed: <String>['android-arm', 'android-arm64', 'android-x64'],
help: 'The target platform for which the app is compiled.', help: 'The target platform for which the app is compiled.',
); );
} }
......
...@@ -1267,7 +1267,7 @@ plugin2=${plugin2.path} ...@@ -1267,7 +1267,7 @@ plugin2=${plugin2.path}
'-Pflutter-root=$flutterRoot', '-Pflutter-root=$flutterRoot',
'-Poutput-dir=${buildDirectory.path}', '-Poutput-dir=${buildDirectory.path}',
'-Pis-plugin=true', '-Pis-plugin=true',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleAarRelease', 'assembleAarRelease',
], ],
environment: anyNamed('environment'), environment: anyNamed('environment'),
...@@ -1281,7 +1281,7 @@ plugin2=${plugin2.path} ...@@ -1281,7 +1281,7 @@ plugin2=${plugin2.path}
'-Pflutter-root=$flutterRoot', '-Pflutter-root=$flutterRoot',
'-Poutput-dir=${buildDirectory.path}', '-Poutput-dir=${buildDirectory.path}',
'-Pis-plugin=true', '-Pis-plugin=true',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleAarRelease', 'assembleAarRelease',
], ],
environment: anyNamed('environment'), environment: anyNamed('environment'),
......
...@@ -42,7 +42,7 @@ void main() { ...@@ -42,7 +42,7 @@ void main() {
final BuildApkCommand command = await runBuildApkCommand(projectPath); final BuildApkCommand command = await runBuildApkCommand(projectPath);
expect(await command.usageValues, expect(await command.usageValues,
containsPair(CustomDimensions.commandBuildApkTargetPlatform, 'android-arm,android-arm64')); containsPair(CustomDimensions.commandBuildApkTargetPlatform, 'android-arm,android-arm64,android-x64'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
AndroidBuilder: () => FakeAndroidBuilder(), AndroidBuilder: () => FakeAndroidBuilder(),
...@@ -209,7 +209,7 @@ flutter: ...@@ -209,7 +209,7 @@ flutter:
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}', '-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false', '-Ptrack-widget-creation=false',
'-Pshrink=true', '-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease', 'assembleRelease',
], ],
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
...@@ -241,7 +241,7 @@ flutter: ...@@ -241,7 +241,7 @@ flutter:
'-q', '-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}', '-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false', '-Ptrack-widget-creation=false',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease', 'assembleRelease',
], ],
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
...@@ -267,7 +267,7 @@ flutter: ...@@ -267,7 +267,7 @@ flutter:
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}', '-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false', '-Ptrack-widget-creation=false',
'-Pshrink=true', '-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'assembleRelease', 'assembleRelease',
], ],
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
......
...@@ -42,7 +42,7 @@ void main() { ...@@ -42,7 +42,7 @@ void main() {
final BuildAppBundleCommand command = await runBuildAppBundleCommand(projectPath); final BuildAppBundleCommand command = await runBuildAppBundleCommand(projectPath);
expect(await command.usageValues, expect(await command.usageValues,
containsPair(CustomDimensions.commandBuildAppBundleTargetPlatform, 'android-arm,android-arm64')); containsPair(CustomDimensions.commandBuildAppBundleTargetPlatform, 'android-arm,android-arm64,android-x64'));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
AndroidBuilder: () => FakeAndroidBuilder(), AndroidBuilder: () => FakeAndroidBuilder(),
...@@ -198,7 +198,7 @@ flutter: ...@@ -198,7 +198,7 @@ flutter:
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}', '-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false', '-Ptrack-widget-creation=false',
'-Pshrink=true', '-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'bundleRelease', 'bundleRelease',
], ],
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
...@@ -232,7 +232,7 @@ flutter: ...@@ -232,7 +232,7 @@ flutter:
'-q', '-q',
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}', '-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false', '-Ptrack-widget-creation=false',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'bundleRelease', 'bundleRelease',
], ],
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
...@@ -258,7 +258,7 @@ flutter: ...@@ -258,7 +258,7 @@ flutter:
'-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}', '-Ptarget=${fs.path.join(tempDir.path, 'flutter_project', 'lib', 'main.dart')}',
'-Ptrack-widget-creation=false', '-Ptrack-widget-creation=false',
'-Pshrink=true', '-Pshrink=true',
'-Ptarget-platform=android-arm,android-arm64', '-Ptarget-platform=android-arm,android-arm64,android-x64',
'bundleRelease', 'bundleRelease',
], ],
workingDirectory: anyNamed('workingDirectory'), workingDirectory: anyNamed('workingDirectory'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment