compile and ship the front_end blaze worker entrypoint as a snapshot

Bug:
Change-Id: Id8611e484df73a1ffb36baca5c529327bbb336cb
Reviewed-on: https://dart-review.googlesource.com/24560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
This commit is contained in:
Jacob MacDonald 2017-11-29 23:40:35 +00:00 committed by commit-bot@chromium.org
parent 4c5b7821a1
commit 15148dde93
3 changed files with 22 additions and 0 deletions

View file

@ -73,6 +73,7 @@ List<String> preprocessArgs(List<String> args) {
/// An [ArgParser] for generating kernel summaries.
final summaryArgsParser = new ArgParser()
..addFlag('help', negatable: false)
..addOption('dart-sdk-summary')
..addOption('input-summary', allowMultiple: true)
..addOption('multi-root', allowMultiple: true)
@ -92,6 +93,12 @@ Future<bool> computeSummary(List<String> args,
{bool isWorker: false, StringBuffer outputBuffer}) async {
bool succeeded = true;
var parsedArgs = summaryArgsParser.parse(args);
if (parsedArgs['help']) {
print(summaryArgsParser.usage);
exit(0);
}
var options = new CompilerOptions()
..packagesFileUri = Uri.parse(parsedArgs['packages-file'])
..inputSummaries = parsedArgs['input-summary'].map(Uri.parse).toList()

View file

@ -44,6 +44,7 @@ declare_args() {
# ........dartfmt.dart.snapshot
# ........dartdevc.dart.snapshot
# ........dartdevk.dart.snapshot
# ........front_end_worker.dart.snapshot
# ........pub.dart.snapshot
# ........utils_wrapper.dart.snapshot
#.........resources/
@ -161,6 +162,10 @@ _full_sdk_snapshots = [
"dartfmt",
"../utils/dartfmt",
],
[
"front_end_worker",
"../utils/front_end:front_end_worker",
],
[
"pub",
"../utils/pub",

10
utils/front_end/BUILD.gn Normal file
View file

@ -0,0 +1,10 @@
# Copyright (c) 2017, 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.
import("../application_snapshot.gni")
application_snapshot("front_end_worker") {
main_dart = "../../pkg/front_end/tool/bazel/worker.dart"
training_args = [ "--help" ]
}