OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Dart project Authors. All rights reserved. |
abarth-chromium
2015/01/18 22:19:01
The Dart project Authors -> The Chromium Authors?
zra
2015/01/20 17:36:51
Done.
| |
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 import("//mojo/public/mojo_application.gni") | |
6 | |
7 group("dart") { | |
8 deps = [ | |
9 ":dart_content_handler", | |
10 ] | |
11 } | |
12 | |
5 action("generate_snapshot_bin") { | 13 action("generate_snapshot_bin") { |
6 deps = [ | 14 deps = [ |
7 "//dart/runtime/bin:gen_snapshot", | 15 "//dart/runtime/bin:gen_snapshot", |
16 "//mojo/public/interfaces/application", | |
8 ] | 17 ] |
9 inputs = [ | 18 inputs = [ |
10 "snapshot.dart", | 19 "snapshot.dart", |
11 "//dart/runtime/tools/create_snapshot_bin.py", | 20 "//dart/runtime/tools/create_snapshot_bin.py", |
12 "//mojo/dart/embedder/builtin.dart", | 21 "//mojo/dart/embedder/builtin.dart", |
13 "//mojo/public/dart/bindings.dart", | 22 "//mojo/public/dart/bindings.dart", |
14 "//mojo/public/dart/core.dart", | 23 "//mojo/public/dart/core.dart", |
15 "//mojo/public/dart/src/buffer.dart", | 24 "//mojo/public/dart/src/buffer.dart", |
16 "//mojo/public/dart/src/client.dart", | 25 "//mojo/public/dart/src/client.dart", |
17 "//mojo/public/dart/src/codec.dart", | 26 "//mojo/public/dart/src/codec.dart", |
18 "//mojo/public/dart/src/data_pipe.dart", | 27 "//mojo/public/dart/src/data_pipe.dart", |
28 "//mojo/public/dart/src/drain_data.dart", | |
19 "//mojo/public/dart/src/event_stream.dart", | 29 "//mojo/public/dart/src/event_stream.dart", |
20 "//mojo/public/dart/src/handle.dart", | 30 "//mojo/public/dart/src/handle.dart", |
21 "//mojo/public/dart/src/handle_watcher.dart", | 31 "//mojo/public/dart/src/handle_watcher.dart", |
22 "//mojo/public/dart/src/interface.dart", | 32 "//mojo/public/dart/src/interface.dart", |
23 "//mojo/public/dart/src/message.dart", | 33 "//mojo/public/dart/src/message.dart", |
24 "//mojo/public/dart/src/message_pipe.dart", | 34 "//mojo/public/dart/src/message_pipe.dart", |
25 "//mojo/public/dart/src/struct.dart", | 35 "//mojo/public/dart/src/struct.dart", |
26 "//mojo/public/dart/src/timer_impl.dart", | 36 "//mojo/public/dart/src/timer_impl.dart", |
27 "//mojo/public/dart/src/timer_queue.dart", | 37 "//mojo/public/dart/src/timer_queue.dart", |
28 "//mojo/public/dart/src/types.dart", | 38 "//mojo/public/dart/src/types.dart", |
39 "//services/dart/lib/application.dart", | |
40 "//services/dart/lib/src/application.dart", | |
41 "//services/dart/lib/src/service_provider.dart", | |
29 ] | 42 ] |
30 output = "$target_gen_dir/snapshot_gen.bin" | 43 output = "$target_gen_dir/snapshot_gen.bin" |
31 outputs = [ | 44 outputs = [ |
32 output, | 45 output, |
33 ] | 46 ] |
34 | 47 |
35 script = "//dart/runtime/tools/create_snapshot_bin.py" | 48 script = "//dart/runtime/tools/create_snapshot_bin.py" |
49 application_path = rebase_path("//services/dart/lib/application.dart") | |
36 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") | 50 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") |
37 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") | 51 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") |
38 core_path = rebase_path("//mojo/public/dart/core.dart") | 52 core_path = rebase_path("//mojo/public/dart/core.dart") |
39 args = [ | 53 args = [ |
40 "--executable", rebase_path("$root_out_dir/gen_snapshot"), | 54 "--executable", rebase_path("$root_out_dir/gen_snapshot"), |
41 "--package_root", rebase_path("$root_gen_dir"), | 55 "--package_root", rebase_path("$root_gen_dir"), |
42 "--script", rebase_path("snapshot.dart"), | 56 "--script", rebase_path("snapshot.dart"), |
43 "--output_bin", rebase_path(output, root_build_dir), | 57 "--output_bin", rebase_path(output, root_build_dir), |
44 "--target_os", os, | 58 "--target_os", os, |
59 "--url_mapping=dart:mojo_application,$application_path", | |
45 "--url_mapping=dart:mojo_bindings,$bindings_path", | 60 "--url_mapping=dart:mojo_bindings,$bindings_path", |
46 "--url_mapping=dart:mojo_builtin,$builtin_path", | 61 "--url_mapping=dart:mojo_builtin,$builtin_path", |
47 "--url_mapping=dart:mojo_core,$core_path", | 62 "--url_mapping=dart:mojo_core,$core_path", |
48 ] | 63 ] |
49 } | 64 } |
50 | 65 |
51 action("generate_snapshot_file") { | 66 action("generate_snapshot_file") { |
52 deps = [ | 67 deps = [ |
53 ":generate_snapshot_bin", | 68 ":generate_snapshot_bin", |
54 ] | 69 ] |
55 inputs = [ | 70 inputs = [ |
56 "//dart/runtime/tools/create_snapshot_file.py", | 71 "//dart/runtime/tools/create_snapshot_file.py", |
57 "snapshot.cc.tmpl", | 72 "//mojo/dart/embedder/snapshot.cc.tmpl", |
58 "$target_gen_dir/snapshot_gen.bin", | 73 "$target_gen_dir/snapshot_gen.bin", |
59 ] | 74 ] |
60 output = "$target_gen_dir/snapshot.cc" | 75 output = "$target_gen_dir/snapshot.cc" |
61 outputs = [ | 76 outputs = [ |
62 output, | 77 output, |
63 ] | 78 ] |
64 | 79 |
65 script = "//dart/runtime/tools/create_snapshot_file.py" | 80 script = "//dart/runtime/tools/create_snapshot_file.py" |
66 args = [ | 81 args = [ |
67 "--input_bin", rebase_path("$target_gen_dir/snapshot_gen.bin"), | 82 "--input_bin", rebase_path("$target_gen_dir/snapshot_gen.bin"), |
68 "--input_cc", rebase_path("snapshot.cc.tmpl"), | 83 "--input_cc", rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), |
69 "--output", rebase_path(output), | 84 "--output", rebase_path(output), |
70 ] | 85 ] |
71 } | 86 } |
72 | 87 |
73 source_set("dart_controller") { | 88 source_set("dart_controller") { |
74 sources = [ | 89 sources = [ |
75 "builtin.cc", | |
76 "builtin.h", | |
77 "builtin_natives.cc", | |
78 "dart_controller.cc", | |
79 "dart_controller.h", | |
80 "isolate_data.h", | |
81 "mojo_natives.cc", | |
82 "mojo_natives.h", | |
83 "$target_gen_dir/snapshot.cc", | 90 "$target_gen_dir/snapshot.cc", |
84 ] | 91 ] |
85 | 92 |
86 deps = [ | 93 deps = [ |
87 ":generate_snapshot_file", | 94 ":generate_snapshot_file", |
95 "//mojo/dart/embedder:dart_controller_no_snapshot", | |
96 ] | |
97 } | |
98 | |
99 mojo_native_application("dart_content_handler") { | |
100 sources = [ | |
101 "content_handler_main.cc", | |
102 "dart_app.cc", | |
103 "dart_app.h", | |
104 ] | |
105 | |
106 deps = [ | |
107 ":dart_controller", | |
88 "//base", | 108 "//base", |
89 "//base:i18n", | 109 "//base:i18n", |
90 "//crypto", | 110 "//crypto", |
91 "//dart/runtime:libdart", | 111 "//dart/runtime:libdart", |
92 "//dart/runtime/bin:libdart_embedder_noio", | 112 "//mojo/application", |
93 "//mojo/public/c/system", | 113 "//mojo/application:application", |
114 "//mojo/application:content_handler", | |
115 "//mojo/dart/embedder:dart_controller_no_snapshot", | |
116 "//mojo/common", | |
117 "//mojo/environment:chromium", | |
118 "//mojo/icu", | |
94 "//mojo/public/cpp/system", | 119 "//mojo/public/cpp/system", |
120 "//mojo/public/cpp/utility", | |
121 "//mojo/public/interfaces/application", | |
122 "//mojo/services/content_handler/public/interfaces", | |
123 "//mojo/services/network/public/interfaces", | |
124 ] | |
125 } | |
126 | |
127 mojo_native_application("dart_apptests") { | |
128 testonly = true | |
129 | |
130 sources = [ | |
131 "echo_apptest.cc", | |
95 ] | 132 ] |
96 | 133 |
97 defines = [] | 134 deps = [ |
98 if (is_debug) { | 135 "//base", |
99 defines += [ "DEBUG" ] | 136 "//mojo/application", |
100 } else { | 137 "//mojo/application:test_support", |
101 defines += [ "NDEBUG" ] | 138 "//mojo/public/cpp/bindings", |
102 } | 139 "//mojo/public/cpp/system", |
103 | 140 "//services/dart/test:echo_service", |
104 include_dirs = [ "//dart/runtime" ] | 141 ] |
105 } | 142 } |
OLD | NEW |