[dart2js] Remove ability to choose --legacy-javascript
Change-Id: I48cc93c5778807e6c86168b096ae8ae97ff08b66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232483
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index c0c8468..1d417b8 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -82,11 +82,11 @@
/// [FeatureOption]s which are shipped and cannot be toggled.
late final List<FeatureOption> shipped = [
newHolders,
+ legacyJavaScript,
];
/// [FeatureOption]s which default to enabled.
late final List<FeatureOption> shipping = [
- legacyJavaScript,
useContentSecurityPolicy,
];
@@ -948,7 +948,7 @@
}
if (enableFeature && feature.isNegativeFlag) {
throw ArgumentError(
- "$disableFeatureFlag has already shipped and cannot be enabled.");
+ "$enableFeatureFlag has been removed and cannot be enabled.");
}
if (disableFeature && !feature.isNegativeFlag) {
throw ArgumentError(