cc3e22f724
Doesn't do anything with the new target, but establishes a public API for dev_compiler (at least within the SDK) Change-Id: I4c86b890d3993f96cf32ed0f749608a72a173da6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119526 Commit-Queue: Jonah Williams <jonahwilliams@google.com> Reviewed-by: Alexander Thomas <athom@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com> Reviewed-by: Jake Macdonald <jakemac@google.com> Reviewed-by: Zach Anderson <zra@google.com>
25 lines
975 B
Dart
25 lines
975 B
Dart
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
library vm.target.install;
|
|
|
|
import 'package:kernel/target/targets.dart' show targets, TargetFlags;
|
|
import 'package:vm/target/dart_runner.dart' show DartRunnerTarget;
|
|
import 'package:vm/target/flutter.dart' show FlutterTarget;
|
|
import 'package:vm/target/flutter_runner.dart' show FlutterRunnerTarget;
|
|
import 'package:vm/target/vm.dart' show VmTarget;
|
|
|
|
bool _installed = false;
|
|
|
|
void installAdditionalTargets() {
|
|
if (!_installed) {
|
|
targets["dart_runner"] = (TargetFlags flags) => DartRunnerTarget(flags);
|
|
targets["flutter"] = (TargetFlags flags) => FlutterTarget(flags);
|
|
targets["flutter_runner"] =
|
|
(TargetFlags flags) => FlutterRunnerTarget(flags);
|
|
targets["vm"] = (TargetFlags flags) => VmTarget(flags);
|
|
_installed = true;
|
|
}
|
|
}
|