Unverified Commit ac8b906c authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Eliminate support for Dart 1 in AOT snapshotter (#21388)

parent ed0b8be0
...@@ -75,7 +75,6 @@ class AOTSnapshotter { ...@@ -75,7 +75,6 @@ class AOTSnapshotter {
@required String mainPath, @required String mainPath,
@required String packagesPath, @required String packagesPath,
@required String outputPath, @required String outputPath,
@required bool previewDart2,
@required bool buildSharedLibrary, @required bool buildSharedLibrary,
IOSArch iosArch, IOSArch iosArch,
List<String> extraGenSnapshotOptions = const <String>[], List<String> extraGenSnapshotOptions = const <String>[],
...@@ -130,13 +129,11 @@ class AOTSnapshotter { ...@@ -130,13 +129,11 @@ class AOTSnapshotter {
'--embedder_entry_points_manifest=$vmEntryPoints', '--embedder_entry_points_manifest=$vmEntryPoints',
'--embedder_entry_points_manifest=$ioEntryPoints', '--embedder_entry_points_manifest=$ioEntryPoints',
]; ];
if (previewDart2) { genSnapshotArgs.addAll(<String>[
genSnapshotArgs.addAll(<String>[ '--reify-generic-functions',
'--reify-generic-functions', '--strong',
'--strong', '--sync-async',
'--sync-async', ]);
]);
}
if (extraGenSnapshotOptions != null && extraGenSnapshotOptions.isNotEmpty) { if (extraGenSnapshotOptions != null && extraGenSnapshotOptions.isNotEmpty) {
printTrace('Extra gen_snapshot options: $extraGenSnapshotOptions'); printTrace('Extra gen_snapshot options: $extraGenSnapshotOptions');
genSnapshotArgs.addAll(extraGenSnapshotOptions); genSnapshotArgs.addAll(extraGenSnapshotOptions);
...@@ -191,7 +188,6 @@ class AOTSnapshotter { ...@@ -191,7 +188,6 @@ class AOTSnapshotter {
'buildMode': buildMode.toString(), 'buildMode': buildMode.toString(),
'targetPlatform': platform.toString(), 'targetPlatform': platform.toString(),
'entryPoint': mainPath, 'entryPoint': mainPath,
'dart2': previewDart2.toString(),
'sharedLib': buildSharedLibrary.toString(), 'sharedLib': buildSharedLibrary.toString(),
'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '), 'extraGenSnapshotOptions': extraGenSnapshotOptions.join(' '),
}, },
......
...@@ -110,7 +110,6 @@ class BuildAotCommand extends BuildSubCommand { ...@@ -110,7 +110,6 @@ class BuildAotCommand extends BuildSubCommand {
mainPath: mainPath, mainPath: mainPath,
packagesPath: PackageMap.globalPackagesPath, packagesPath: PackageMap.globalPackagesPath,
outputPath: outputPath, outputPath: outputPath,
previewDart2: true,
buildSharedLibrary: false, buildSharedLibrary: false,
extraGenSnapshotOptions: argResults[FlutterOptions.kExtraGenSnapshotOptions], extraGenSnapshotOptions: argResults[FlutterOptions.kExtraGenSnapshotOptions],
).then((int buildExitCode) { ).then((int buildExitCode) {
...@@ -141,7 +140,6 @@ class BuildAotCommand extends BuildSubCommand { ...@@ -141,7 +140,6 @@ class BuildAotCommand extends BuildSubCommand {
mainPath: mainPath, mainPath: mainPath,
packagesPath: PackageMap.globalPackagesPath, packagesPath: PackageMap.globalPackagesPath,
outputPath: outputPath, outputPath: outputPath,
previewDart2: true,
buildSharedLibrary: argResults['build-shared-library'], buildSharedLibrary: argResults['build-shared-library'],
extraGenSnapshotOptions: argResults[FlutterOptions.kExtraGenSnapshotOptions], extraGenSnapshotOptions: argResults[FlutterOptions.kExtraGenSnapshotOptions],
); );
......
...@@ -146,7 +146,6 @@ void main() { ...@@ -146,7 +146,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
), isNot(equals(0))); ), isNot(equals(0)));
}, overrides: contextOverrides); }, overrides: contextOverrides);
...@@ -159,7 +158,6 @@ void main() { ...@@ -159,7 +158,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
), isNot(0)); ), isNot(0));
}, overrides: contextOverrides); }, overrides: contextOverrides);
...@@ -172,7 +170,6 @@ void main() { ...@@ -172,7 +170,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
), isNot(0)); ), isNot(0));
}, overrides: contextOverrides); }, overrides: contextOverrides);
...@@ -198,7 +195,6 @@ void main() { ...@@ -198,7 +195,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
iosArch: IOSArch.armv7, iosArch: IOSArch.armv7,
); );
...@@ -245,7 +241,6 @@ void main() { ...@@ -245,7 +241,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
iosArch: IOSArch.arm64, iosArch: IOSArch.arm64,
); );
...@@ -293,7 +288,6 @@ void main() { ...@@ -293,7 +288,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
); );
expect(genSnapshotExitCode, 0); expect(genSnapshotExitCode, 0);
...@@ -345,7 +339,6 @@ void main() { ...@@ -345,7 +339,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
); );
expect(genSnapshotExitCode, 0); expect(genSnapshotExitCode, 0);
...@@ -392,7 +385,6 @@ void main() { ...@@ -392,7 +385,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
iosArch: IOSArch.armv7, iosArch: IOSArch.armv7,
); );
...@@ -439,7 +431,6 @@ void main() { ...@@ -439,7 +431,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
iosArch: IOSArch.arm64, iosArch: IOSArch.arm64,
); );
...@@ -474,7 +465,6 @@ void main() { ...@@ -474,7 +465,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: true, buildSharedLibrary: true,
previewDart2: true,
); );
expect(genSnapshotExitCode, isNot(0)); expect(genSnapshotExitCode, isNot(0));
...@@ -506,7 +496,6 @@ void main() { ...@@ -506,7 +496,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
); );
expect(genSnapshotExitCode, 0); expect(genSnapshotExitCode, 0);
...@@ -558,7 +547,6 @@ void main() { ...@@ -558,7 +547,6 @@ void main() {
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
buildSharedLibrary: false, buildSharedLibrary: false,
previewDart2: true,
); );
expect(genSnapshotExitCode, 0); expect(genSnapshotExitCode, 0);
......
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