[flutter] Mark dart:mirrors library as unsupported in Flutter

Flutter doesn't support dart:mirrors (in all modes).
With this change CFE will be able to correctly select conditional
imports 'if (dart.library.mirrors)' and evaluate
const bool.fromEnvironment('dart.library.mirrors') in Flutter.

Issue: https://github.com/dart-lang/sdk/issues/49266
Change-Id: Ibde848d4a99ac818b736fe0d957cf23d920aa249
TEST=ci
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249021
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
Alexander Markov 2022-06-17 21:53:49 +00:00 committed by Commit Bot
parent 3644a596d2
commit 801bbb551b

View file

@ -49,6 +49,10 @@ class FlutterTarget extends VmTarget {
@override
List<String> get extraRequiredLibrariesPlatform => const <String>[];
@override
DartLibrarySupport get dartLibrarySupport =>
const CustomizedDartLibrarySupport(unsupported: {'mirrors'});
@override
void performPreConstantEvaluationTransformations(
Component component,