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

Side by Side Diff: utils/invoke_dart.gni

Issue 2442513003: GN: Build the SDK with app snapshots instead of script snapshots. (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
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 _dart_root = rebase_path("..") 5 _dart_root = rebase_path("..")
6 6
7 template("invoke_dart") { 7 template("invoke_dart") {
8 assert(defined(invoker.outputs), "invoke_dart must specify outputs") 8 assert(defined(invoker.outputs), "invoke_dart must specify outputs")
9 extra_deps = [] 9 extra_deps = []
10 if (defined(invoker.deps)) { 10 if (defined(invoker.deps)) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 script = "$_dart_root/tools/dart_for_gn.py" 44 script = "$_dart_root/tools/dart_for_gn.py"
45 args = [ 45 args = [
46 dart, 46 dart,
47 ] + extra_args 47 ] + extra_args
48 } 48 }
49 } 49 }
50 50
51 template("application_snapshot") { 51 template("application_snapshot") {
52 assert(defined(invoker.main_dart), "Must specify 'main_dart'") 52 assert(defined(invoker.main_dart), "Must specify 'main_dart'")
53 assert(defined(invoker.training_args), "Must specify 'training_args'")
53 main_dart = invoker.main_dart 54 main_dart = invoker.main_dart
55 training_args = invoker.training_args
54 name = target_name 56 name = target_name
55 if (defined(invoker.name)) { 57 if (defined(invoker.name)) {
56 name = invoker.name 58 name = invoker.name
57 } 59 }
58 extra_deps = [] 60 extra_deps = []
59 if (defined(invoker.deps)) { 61 if (defined(invoker.deps)) {
60 extra_deps += invoker.deps 62 extra_deps += invoker.deps
61 } 63 }
62 extra_inputs = [] 64 extra_inputs = []
63 if (defined(invoker.inputs)) { 65 if (defined(invoker.inputs)) {
(...skipping 14 matching lines...) Expand all
78 output, 80 output,
79 ] 81 ]
80 82
81 dot_packages = rebase_path("$_dart_root/.packages") 83 dot_packages = rebase_path("$_dart_root/.packages")
82 abs_output = rebase_path(output) 84 abs_output = rebase_path(output)
83 main_file = rebase_path(main_dart) 85 main_file = rebase_path(main_dart)
84 86
85 args = [ 87 args = [
86 "--packages=$dot_packages", 88 "--packages=$dot_packages",
87 "--snapshot=$abs_output", 89 "--snapshot=$abs_output",
88 main_file 90 "--snapshot-kind=app-jit",
89 ] 91 main_file,
92 ] + training_args
90 } 93 }
91 } 94 }
OLDNEW
« utils/compiler/BUILD.gn ('K') | « utils/dartfmt/BUILD.gn ('k') | utils/pub/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698