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("../application_snapshot.gni") | 5 import("../application_snapshot.gni") |
6 | 6 |
7 application_snapshot("dartdevc") { | 7 application_snapshot("dartdevc") { |
8 main_dart = "../../pkg/dev_compiler/bin/dartdevc.dart" | 8 main_dart = "../../pkg/dev_compiler/bin/dartdevc.dart" |
9 training_args = [ | 9 training_args = [ |
10 "--dart-sdk", | 10 "--dart-sdk", |
11 rebase_path("../../sdk"), | 11 rebase_path("../../sdk"), |
12 "--dart-sdk-summary", | 12 "--dart-sdk-summary", |
13 rebase_path("../../pkg/dev_compiler/lib/sdk/ddc_sdk.sum"), | 13 rebase_path("../../pkg/dev_compiler/lib/sdk/ddc_sdk.sum"), |
14 "--library-root", | 14 "--library-root", |
15 rebase_path("../../pkg/dev_compiler"), | 15 rebase_path("../../pkg/dev_compiler"), |
16 "-o", | 16 "-o", |
17 "dartdevc.js", | 17 "dartdevc.js", |
18 "--unsafe-force-compile", | 18 "--unsafe-force-compile", |
19 rebase_path("../../pkg/dev_compiler/bin/dartdevc.dart"), | 19 rebase_path("../../pkg/dev_compiler/bin/dartdevc.dart"), |
20 ] | 20 ] |
21 inputs = exec_script("../../tools/list_dart_files.py", | 21 inputs = exec_script("../../tools/list_dart_files.py", |
22 [ "absolute", | 22 [ "absolute", |
23 rebase_path("../../pkg/dev_compiler/bin") ], | 23 rebase_path("../../pkg/dev_compiler/bin") ], |
24 "list lines") | 24 "list lines") |
25 } | 25 } |
26 | |
27 sdk_lib_files = exec_script("../../tools/list_dart_files.py", | |
28 [ "absolute", rebase_path("../../sdk/lib") ], | |
29 "list lines") | |
30 | |
31 compiler_files = exec_script("../../tools/list_dart_files.py", | |
32 [ "absolute", rebase_path("../../pkg/compiler") ], | |
33 "list lines") | |
34 | |
35 dev_compiler_files = exec_script("../../tools/list_dart_files.py", | |
36 [ "absolute", rebase_path("../../pkg/dev_compiler") ], | |
vsm
2017/05/18 21:01:46
nit: line len
Jacob
2017/05/18 21:06:45
Done.
| |
37 "list lines") | |
38 | |
39 template("dart2js_compile") { | |
40 assert(defined(invoker.main), "Must specify the main file") | |
41 main = invoker.main | |
42 assert(defined(invoker.out), "Must specify the out file") | |
43 out = invoker.out | |
44 abs_main = rebase_path(main) | |
45 abs_output = rebase_path(out) | |
46 | |
47 compiled_action(target_name) { | |
48 tool = "../../runtime/bin:dart" | |
49 inputs = sdk_lib_files + compiler_files + dev_compiler_files | |
50 outputs = [ | |
51 out, | |
52 ] | |
53 | |
54 dot_packages = rebase_path("../../.packages") | |
55 compiler = | |
56 rebase_path("../../pkg/compiler/lib/src/dart2js.dart") | |
57 | |
58 args = [ | |
59 "--packages=$dot_packages", | |
60 compiler, | |
61 "--packages=$dot_packages", | |
62 "$abs_main", | |
63 "-m", | |
64 "-o$abs_output", | |
65 ] | |
66 } | |
67 } | |
68 | |
69 dart2js_compile("dartdevc_web") { | |
70 main = rebase_path("../../pkg/dev_compiler/web/main.dart") | |
71 out = "$root_out_dir/dev_compiler/build/web/ddc_web_compiler.js" | |
72 } | |
73 | |
74 dart2js_compile("stack_trace_mapper") { | |
75 main = rebase_path("../../pkg/dev_compiler/web/stack_trace_mapper.dart") | |
76 out = "$root_out_dir/dev_compiler/build/web/dart_stack_trace_mapper.js" | |
77 } | |
OLD | NEW |