OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 action("generate_snapshot_bin") { | 5 source_set("dart_controller_no_snapshot") { |
6 deps = [ | |
7 "//dart/runtime/bin:gen_snapshot", | |
8 ] | |
9 inputs = [ | |
10 "snapshot.dart", | |
11 "//dart/runtime/tools/create_snapshot_bin.py", | |
12 "//mojo/dart/embedder/builtin.dart", | |
13 "//mojo/public/dart/bindings.dart", | |
14 "//mojo/public/dart/core.dart", | |
15 "//mojo/public/dart/src/buffer.dart", | |
16 "//mojo/public/dart/src/client.dart", | |
17 "//mojo/public/dart/src/codec.dart", | |
18 "//mojo/public/dart/src/data_pipe.dart", | |
19 "//mojo/public/dart/src/event_stream.dart", | |
20 "//mojo/public/dart/src/handle.dart", | |
21 "//mojo/public/dart/src/handle_watcher.dart", | |
22 "//mojo/public/dart/src/interface.dart", | |
23 "//mojo/public/dart/src/message.dart", | |
24 "//mojo/public/dart/src/message_pipe.dart", | |
25 "//mojo/public/dart/src/struct.dart", | |
26 "//mojo/public/dart/src/timer_impl.dart", | |
27 "//mojo/public/dart/src/timer_queue.dart", | |
28 "//mojo/public/dart/src/types.dart", | |
29 ] | |
30 output = "$target_gen_dir/snapshot_gen.bin" | |
31 outputs = [ | |
32 output, | |
33 ] | |
34 | |
35 script = "//dart/runtime/tools/create_snapshot_bin.py" | |
36 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") | |
37 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") | |
38 core_path = rebase_path("//mojo/public/dart/core.dart") | |
39 args = [ | |
40 "--executable", rebase_path("$root_out_dir/gen_snapshot"), | |
41 "--package_root", rebase_path("$root_gen_dir"), | |
42 "--script", rebase_path("snapshot.dart"), | |
43 "--output_bin", rebase_path(output, root_build_dir), | |
44 "--target_os", os, | |
45 "--url_mapping=dart:mojo_bindings,$bindings_path", | |
46 "--url_mapping=dart:mojo_builtin,$builtin_path", | |
47 "--url_mapping=dart:mojo_core,$core_path", | |
48 ] | |
49 } | |
50 | |
51 action("generate_snapshot_file") { | |
52 deps = [ | |
53 ":generate_snapshot_bin", | |
54 ] | |
55 inputs = [ | |
56 "//dart/runtime/tools/create_snapshot_file.py", | |
57 "snapshot.cc.tmpl", | |
58 "$target_gen_dir/snapshot_gen.bin", | |
59 ] | |
60 output = "$target_gen_dir/snapshot.cc" | |
61 outputs = [ | |
62 output, | |
63 ] | |
64 | |
65 script = "//dart/runtime/tools/create_snapshot_file.py" | |
66 args = [ | |
67 "--input_bin", rebase_path("$target_gen_dir/snapshot_gen.bin"), | |
68 "--input_cc", rebase_path("snapshot.cc.tmpl"), | |
69 "--output", rebase_path(output), | |
70 ] | |
71 } | |
72 | |
73 source_set("dart_controller") { | |
74 sources = [ | 6 sources = [ |
75 "builtin.cc", | 7 "builtin.cc", |
76 "builtin.h", | 8 "builtin.h", |
77 "builtin_natives.cc", | 9 "builtin_natives.cc", |
78 "dart_controller.cc", | 10 "dart_controller.cc", |
79 "dart_controller.h", | 11 "dart_controller.h", |
80 "isolate_data.h", | 12 "isolate_data.h", |
81 "mojo_natives.cc", | 13 "mojo_natives.cc", |
82 "mojo_natives.h", | 14 "mojo_natives.h", |
83 "$target_gen_dir/snapshot.cc", | |
84 ] | 15 ] |
85 | 16 |
86 deps = [ | 17 deps = [ |
87 ":generate_snapshot_file", | |
88 "//base", | 18 "//base", |
89 "//base:i18n", | 19 "//base:i18n", |
90 "//crypto", | 20 "//crypto", |
91 "//dart/runtime:libdart", | 21 "//dart/runtime:libdart", |
92 "//dart/runtime/bin:libdart_embedder_noio", | 22 "//dart/runtime/bin:libdart_embedder_noio", |
93 "//mojo/public/c/system", | 23 "//mojo/public/c/system", |
94 "//mojo/public/cpp/system", | 24 "//mojo/public/cpp/system", |
95 ] | 25 ] |
96 | 26 |
97 defines = [] | 27 defines = [] |
98 if (is_debug) { | 28 if (is_debug) { |
99 defines += [ "DEBUG" ] | 29 defines += [ "DEBUG" ] |
100 } else { | 30 } else { |
101 defines += [ "NDEBUG" ] | 31 defines += [ "NDEBUG" ] |
102 } | 32 } |
103 | 33 |
104 include_dirs = [ "//dart/runtime" ] | 34 include_dirs = [ "//dart/runtime" ] |
105 } | 35 } |
OLD | NEW |