| Index: pkg/compiler/lib/src/apiimpl.dart
|
| diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
|
| index 556006a2172a4ac9765a2f35159fd10e3976f0db..6c469a4c3fd05d6a6a0cc157d07028573a2f7aa7 100644
|
| --- a/pkg/compiler/lib/src/apiimpl.dart
|
| +++ b/pkg/compiler/lib/src/apiimpl.dart
|
| @@ -124,8 +124,8 @@ class CompilerImpl extends Compiler {
|
| fatalWarnings: hasOption(options, Flags.fatalWarnings),
|
| suppressHints: hasOption(options, Flags.suppressHints),
|
| terseDiagnostics: hasOption(options, Flags.terse),
|
| - showPackageWarnings:
|
| - hasOption(options, Flags.showPackageWarnings)),
|
| + shownPackageWarnings: extractOptionalCsvOption(
|
| + options, Flags.showPackageWarnings)),
|
| enableExperimentalMirrors:
|
| hasOption(options, Flags.enableExperimentalMirrors),
|
| enableAssertMessage:
|
| @@ -189,6 +189,23 @@ class CompilerImpl extends Compiler {
|
| return const <String>[];
|
| }
|
|
|
| + /// Extract list of comma separated values provided for [flag]. Returns an
|
| + /// empty list if [option] contain [flag] without arguments. Returns `null` if
|
| + /// [option] doesn't contain [flag] with or without arguments.
|
| + static List<String> extractOptionalCsvOption(
|
| + List<String> options, String flag) {
|
| + String prefix = '$flag=';
|
| + for (String option in options) {
|
| + if (option == flag) {
|
| + return const <String>[];
|
| + }
|
| + if (option.startsWith(flag)) {
|
| + return option.substring(prefix.length).split(',');
|
| + }
|
| + }
|
| + return null;
|
| + }
|
| +
|
| static Uri resolvePlatformConfig(Uri libraryRoot,
|
| List<String> options) {
|
| String platformConfigPath =
|
|
|