OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |