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