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 import("../create_timestamp.gni") | 5 import("../create_timestamp.gni") |
6 import("../invoke_dart.gni") | 6 import("../invoke_dart.gni") |
7 | 7 |
8 create_timestamp_file("dart2js_files_stamp") { | 8 create_timestamp_file("dart2js_files_stamp") { |
9 path = rebase_path("../../pkg/compiler/lib") | 9 path = rebase_path("../../pkg/compiler/lib") |
10 output = "$root_gen_dir/dart2js_files.stamp" | 10 output = "$root_gen_dir/dart2js_files.stamp" |
11 } | 11 } |
12 | 12 |
13 create_timestamp_file("runtime_lib_files_stamp") { | 13 create_timestamp_file("runtime_lib_files_stamp") { |
14 path = rebase_path("../../runtime/lib") | 14 path = rebase_path("../../runtime/lib") |
15 output = "$target_gen_dir/runtime_lib_files.stamp" | 15 output = "$target_gen_dir/runtime_lib_files.stamp" |
16 } | 16 } |
17 | 17 |
18 create_timestamp_file("dartdoc_files_stamp") { | 18 create_timestamp_file("dartdoc_files_stamp") { |
19 path = rebase_path("../../sdk/lib/_internal/dartdoc") | 19 path = rebase_path("../../sdk/lib/_internal/dartdoc") |
20 output = "$target_gen_dir/dartdoc_files.stamp" | 20 output = "$target_gen_dir/dartdoc_files.stamp" |
21 } | 21 } |
22 | 22 |
23 invoke_dart("dart2js") { | 23 invoke_dart("dart2js_create_snapshot_entries") { |
24 deps = [ | 24 deps = [ |
25 ":dart2js_files_stamp", | 25 ":dart2js_files_stamp", |
26 ":runtime_lib_files_stamp", | 26 ":runtime_lib_files_stamp", |
27 ":dartdoc_files_stamp", | 27 ":dartdoc_files_stamp", |
28 ] | 28 ] |
29 | 29 |
30 dot_packages = rebase_path("../../.packages") | |
31 create_snapshot_entry = rebase_path("create_snapshot_entry.dart") | |
32 output_dir = rebase_path(root_gen_dir) | |
33 | |
30 inputs = [ | 34 inputs = [ |
31 "../../sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart", | 35 "../../sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart", |
32 "create_snapshot.dart", | 36 create_snapshot_entry, |
33 "$root_gen_dir/dart2js_files.stamp", | 37 "$root_gen_dir/dart2js_files.stamp", |
34 "../../tools/VERSION", | 38 "../../tools/VERSION", |
35 ] | 39 ] |
36 | 40 |
37 utils_output = "$root_gen_dir/utils_wrapper.dart.snapshot" | 41 utils_output = "$root_gen_dir/utils_wrapper.dart" |
38 dart2js_output = "$root_gen_dir/dart2js.dart.snapshot" | 42 dart2js_output = "$root_gen_dir/dart2js.dart" |
39 outputs = [ | 43 outputs = [ |
40 utils_output, | 44 utils_output, |
41 dart2js_output, | 45 dart2js_output, |
42 ] | 46 ] |
43 | 47 |
44 dot_packages = rebase_path("../../.packages") | |
45 create_snapshot = rebase_path("create_snapshot.dart") | |
46 output_dir = rebase_path(root_gen_dir) | |
47 | |
48 args = [ | 48 args = [ |
49 "--packages=$dot_packages", | 49 "--packages=$dot_packages", |
50 create_snapshot, | 50 create_snapshot_entry, |
51 "--output_dir=$output_dir", | 51 "--output_dir=$output_dir", |
52 "--dart2js_main=pkg/compiler/lib/src/dart2js.dart", | 52 "--dart2js_main=pkg/compiler/lib/src/dart2js.dart", |
53 ] | 53 ] |
54 } | 54 } |
55 | |
56 application_snapshot("dart2js") { | |
57 deps = [ | |
58 ":dart2js_create_snapshot_entries" | |
59 ] | |
60 main_dart = "$root_gen_dir/dart2js.dart" | |
61 training_args = [ | |
62 "--library-root=" + rebase_path("../../sdk"), | |
63 rebase_path("../../tests/language/first_test.dart") | |
64 ] | |
65 } | |
66 | |
67 application_snapshot("utils_wrapper") { | |
68 deps = [ | |
69 ":dart2js_create_snapshot_entries" | |
70 ] | |
71 main_dart = "$root_gen_dir/utils_wrapper.dart" | |
72 training_args = [ "--help" ] | |
73 } | |
zra
2016/10/21 15:25:24
Maybe add:
group("compiler") {
deps = [
":d
rmacnak
2016/10/22 00:39:47
Done.
| |
OLD | NEW |