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

Side by Side Diff: utils/invoke_dart.gni

Issue 2433573002: GN: Build app snapshots for the SDK tools. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « utils/dartfmt/BUILD.gn ('k') | utils/pub/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 declare_args() {
6 dart_app_snapshot_kind = "app-after-run"
7 }
8
5 _dart_root = rebase_path("..") 9 _dart_root = rebase_path("..")
6 10
7 template("invoke_dart") { 11 template("invoke_dart") {
8 assert(defined(invoker.outputs), "invoke_dart must specify outputs") 12 assert(defined(invoker.outputs), "invoke_dart must specify outputs")
9 extra_deps = [] 13 extra_deps = []
10 if (defined(invoker.deps)) { 14 if (defined(invoker.deps)) {
11 extra_deps += invoker.deps 15 extra_deps += invoker.deps
12 } 16 }
13 17
14 extra_inputs = [] 18 extra_inputs = []
(...skipping 28 matching lines...) Expand all
43 47
44 script = "$_dart_root/tools/dart_for_gn.py" 48 script = "$_dart_root/tools/dart_for_gn.py"
45 args = [ 49 args = [
46 dart, 50 dart,
47 ] + extra_args 51 ] + extra_args
48 } 52 }
49 } 53 }
50 54
51 template("application_snapshot") { 55 template("application_snapshot") {
52 assert(defined(invoker.main_dart), "Must specify 'main_dart'") 56 assert(defined(invoker.main_dart), "Must specify 'main_dart'")
57 assert(defined(invoker.training_args), "Must specify 'training_args'")
53 main_dart = invoker.main_dart 58 main_dart = invoker.main_dart
59 training_args = invoker.training_args
54 name = target_name 60 name = target_name
55 if (defined(invoker.name)) { 61 if (defined(invoker.name)) {
56 name = invoker.name 62 name = invoker.name
57 } 63 }
58 extra_deps = [] 64 extra_deps = []
59 if (defined(invoker.deps)) { 65 if (defined(invoker.deps)) {
60 extra_deps += invoker.deps 66 extra_deps += invoker.deps
61 } 67 }
62 extra_inputs = [] 68 extra_inputs = []
63 if (defined(invoker.inputs)) { 69 if (defined(invoker.inputs)) {
(...skipping 14 matching lines...) Expand all
78 output, 84 output,
79 ] 85 ]
80 86
81 dot_packages = rebase_path("$_dart_root/.packages") 87 dot_packages = rebase_path("$_dart_root/.packages")
82 abs_output = rebase_path(output) 88 abs_output = rebase_path(output)
83 main_file = rebase_path(main_dart) 89 main_file = rebase_path(main_dart)
84 90
85 args = [ 91 args = [
86 "--packages=$dot_packages", 92 "--packages=$dot_packages",
87 "--snapshot=$abs_output", 93 "--snapshot=$abs_output",
88 main_file 94 "--snapshot-kind=$dart_app_snapshot_kind",
89 ] 95 main_file,
96 ] + training_args
90 } 97 }
91 } 98 }
OLDNEW
« no previous file with comments | « utils/dartfmt/BUILD.gn ('k') | utils/pub/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698