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, |