Unverified Commit 8c4f0c0d authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Eliminate build aot --interpreter flag (#17025)

This is required for iOS debug builds, but unused otherwise. In theory,
Android debug builds could be run in this mode, but this is historically
untested and adds unnecessary complexity to the code. If ad-hoc testing
is required, it can be patched in when necessary.
parent c482cc4b
...@@ -20,7 +20,6 @@ import '../version.dart'; ...@@ -20,7 +20,6 @@ import '../version.dart';
import 'context.dart'; import 'context.dart';
import 'file_system.dart'; import 'file_system.dart';
import 'process.dart'; import 'process.dart';
import 'utils.dart' show toTitleCase;
GenSnapshot get genSnapshot => context[GenSnapshot]; GenSnapshot get genSnapshot => context[GenSnapshot];
...@@ -215,17 +214,11 @@ class Snapshotter { ...@@ -215,17 +214,11 @@ class Snapshotter {
@required String depfilePath, @required String depfilePath,
@required String packagesPath, @required String packagesPath,
@required String outputPath, @required String outputPath,
@required bool interpreter,
@required bool previewDart2, @required bool previewDart2,
@required bool preferSharedLibrary, @required bool preferSharedLibrary,
List<String> extraFrontEndOptions: const <String>[], List<String> extraFrontEndOptions: const <String>[],
List<String> extraGenSnapshotOptions: const <String>[], List<String> extraGenSnapshotOptions: const <String>[],
}) async { }) async {
if (!isAotBuildMode(buildMode) && !interpreter) {
printError('${toTitleCase(getModeName(buildMode))} mode does not support AOT compilation.');
return -1;
}
if (!(platform == TargetPlatform.android_arm || if (!(platform == TargetPlatform.android_arm ||
platform == TargetPlatform.android_arm64 || platform == TargetPlatform.android_arm64 ||
platform == TargetPlatform.ios)) { platform == TargetPlatform.ios)) {
...@@ -257,6 +250,7 @@ class Snapshotter { ...@@ -257,6 +250,7 @@ class Snapshotter {
final String ioEntryPoints = artifacts.getArtifactPath(Artifact.dartIoEntriesTxt, platform, buildMode); final String ioEntryPoints = artifacts.getArtifactPath(Artifact.dartIoEntriesTxt, platform, buildMode);
assert(ioEntryPoints != null); assert(ioEntryPoints != null);
final bool interpreter = platform == TargetPlatform.ios && buildMode == BuildMode.debug;
final List<String> entryPointsJsonFiles = <String>[]; final List<String> entryPointsJsonFiles = <String>[];
if (previewDart2 && !interpreter) { if (previewDart2 && !interpreter) {
entryPointsJsonFiles.addAll(<String>[ entryPointsJsonFiles.addAll(<String>[
......
...@@ -26,7 +26,6 @@ class BuildAotCommand extends BuildSubCommand { ...@@ -26,7 +26,6 @@ class BuildAotCommand extends BuildSubCommand {
defaultsTo: 'android-arm', defaultsTo: 'android-arm',
allowed: <String>['android-arm', 'android-arm64', 'ios'] allowed: <String>['android-arm', 'android-arm64', 'ios']
) )
..addFlag('interpreter')
..addFlag('quiet', defaultsTo: false) ..addFlag('quiet', defaultsTo: false)
..addFlag('preview-dart-2', ..addFlag('preview-dart-2',
defaultsTo: true, defaultsTo: true,
...@@ -71,7 +70,6 @@ class BuildAotCommand extends BuildSubCommand { ...@@ -71,7 +70,6 @@ class BuildAotCommand extends BuildSubCommand {
platform, platform,
getBuildMode(), getBuildMode(),
outputPath: argResults['output-dir'], outputPath: argResults['output-dir'],
interpreter: argResults['interpreter'],
previewDart2: argResults['preview-dart-2'], previewDart2: argResults['preview-dart-2'],
extraFrontEndOptions: argResults[FlutterOptions.kExtraFrontEndOptions], extraFrontEndOptions: argResults[FlutterOptions.kExtraFrontEndOptions],
extraGenSnapshotOptions: argResults[FlutterOptions.kExtraGenSnapshotOptions], extraGenSnapshotOptions: argResults[FlutterOptions.kExtraGenSnapshotOptions],
...@@ -98,7 +96,6 @@ Future<String> buildAotSnapshot( ...@@ -98,7 +96,6 @@ Future<String> buildAotSnapshot(
TargetPlatform platform, TargetPlatform platform,
BuildMode buildMode, { BuildMode buildMode, {
String outputPath, String outputPath,
bool interpreter: false,
bool previewDart2: false, bool previewDart2: false,
List<String> extraFrontEndOptions, List<String> extraFrontEndOptions,
List<String> extraGenSnapshotOptions, List<String> extraGenSnapshotOptions,
...@@ -114,7 +111,6 @@ Future<String> buildAotSnapshot( ...@@ -114,7 +111,6 @@ Future<String> buildAotSnapshot(
depfilePath: 'depFilePathGoesHere', depfilePath: 'depFilePathGoesHere',
packagesPath: PackageMap.globalPackagesPath, packagesPath: PackageMap.globalPackagesPath,
outputPath: outputPath, outputPath: outputPath,
interpreter: interpreter,
previewDart2: previewDart2, previewDart2: previewDart2,
preferSharedLibrary: preferSharedLibrary, preferSharedLibrary: preferSharedLibrary,
extraFrontEndOptions: extraFrontEndOptions, extraFrontEndOptions: extraFrontEndOptions,
......
...@@ -676,7 +676,6 @@ void main() { ...@@ -676,7 +676,6 @@ void main() {
depfilePath: fs.path.join(outputPath, 'snapshot.d'), depfilePath: fs.path.join(outputPath, 'snapshot.d'),
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
interpreter: true,
preferSharedLibrary: false, preferSharedLibrary: false,
previewDart2: true, previewDart2: true,
); );
...@@ -722,7 +721,6 @@ void main() { ...@@ -722,7 +721,6 @@ void main() {
depfilePath: fs.path.join(outputPath, 'snapshot.d'), depfilePath: fs.path.join(outputPath, 'snapshot.d'),
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
interpreter: false,
preferSharedLibrary: false, preferSharedLibrary: false,
previewDart2: true, previewDart2: true,
); );
...@@ -770,7 +768,6 @@ void main() { ...@@ -770,7 +768,6 @@ void main() {
depfilePath: fs.path.join(outputPath, 'snapshot.d'), depfilePath: fs.path.join(outputPath, 'snapshot.d'),
packagesPath: '.packages', packagesPath: '.packages',
outputPath: outputPath, outputPath: outputPath,
interpreter: false,
preferSharedLibrary: false, preferSharedLibrary: false,
previewDart2: true, previewDart2: true,
); );
......
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