Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: pkg/kernel/lib/target/flutter.dart

Issue 2972323002: Add 'flutter_release' patch_sdk mode to patch_sdk (Closed)
Patch Set: Replace flag with dedicated target Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/kernel/lib/target/flutter.dart
diff --git a/pkg/kernel/lib/target/flutter.dart b/pkg/kernel/lib/target/flutter.dart
index 79b307156554150d54d84a4e259f71f8421dcc1a..33ad7181d665b4700fc451c5dbf062b056e79240 100644
--- a/pkg/kernel/lib/target/flutter.dart
+++ b/pkg/kernel/lib/target/flutter.dart
@@ -15,7 +15,9 @@ import 'targets.dart';
class FlutterTarget extends Target {
final TargetFlags flags;
- FlutterTarget(this.flags);
+ bool includeVMService;
ahe 2017/07/10 13:19:02 Make this final.
ahe 2017/07/10 13:19:02 includeVMService -> includeVmService
aam 2017/07/10 22:11:37 Done.
aam 2017/07/10 22:11:37 I can't do that because I can't use "super(flags,
+
+ FlutterTarget(this.flags, {this.includeVMService: true});
bool get strongMode => flags.strongMode;
@@ -25,27 +27,32 @@ class FlutterTarget extends Target {
// This is the order that bootstrap libraries are loaded according to
// `runtime/vm/object_store.h`.
- List<String> get extraRequiredLibraries => const <String>[
- 'dart:async',
- 'dart:collection',
- 'dart:convert',
- 'dart:developer',
- 'dart:_internal',
- 'dart:isolate',
- 'dart:math',
-
- // The library dart:mirrors may be ignored by the VM, e.g. when built in
- // PRODUCT mode.
- 'dart:mirrors',
-
- 'dart:profiler',
- 'dart:typed_data',
- 'dart:nativewrappers',
- 'dart:io',
-
- // Required for flutter.
- 'dart:ui',
- ];
+ List<String> get extraRequiredLibraries {
+ List<String> libraries = const <String>[
+ 'dart:async',
+ 'dart:collection',
+ 'dart:convert',
+ 'dart:developer',
+ 'dart:_internal',
+ 'dart:isolate',
+ 'dart:math',
+
+ // The library dart:mirrors may be ignored by the VM, e.g. when built in
+ // PRODUCT mode.
+ 'dart:mirrors',
+
+ 'dart:profiler',
+ 'dart:typed_data',
+ 'dart:nativewrappers',
+ 'dart:io',
+
+ // Required for flutter.
+ 'dart:ui',
+ ];
+ return includeVMService
+ ? (new List.from(libraries)..add('dart:vmservice_sky'))
+ : libraries;
+ }
void performModularTransformationsOnLibraries(
CoreTypes coreTypes, ClassHierarchy hierarchy, List<Library> libraries,

Powered by Google App Engine
This is Rietveld 408576698