Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: mojo/edk/system/BUILD.gn

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: some review comments Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 import("../mojo_edk.gni") 5 import("../mojo_edk.gni")
6 import("//testing/test.gni") 6 import("//testing/test.gni")
7 import("../../../third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
7 8
8 if (is_android) { 9 if (is_android) {
9 import("//build/config/android/config.gni") 10 import("//build/config/android/config.gni")
10 import("//build/config/android/rules.gni") 11 import("//build/config/android/rules.gni")
11 } 12 }
12 13
13 config("system_config") { 14 config("system_config") {
14 defines = [ 15 defines = [
15 # Ensures that dependent projects import the core functions on Windows. 16 # Ensures that dependent projects import the core functions on Windows.
16 "MOJO_USE_SYSTEM_IMPL", 17 "MOJO_USE_SYSTEM_IMPL",
17 ] 18 ]
18 } 19 }
19 20
21 mojom("master") {
22 sources = [
23 "master.mojom",
24 ]
25 }
26
20 component("system") { 27 component("system") {
21 output_name = "mojo_system_impl" 28 output_name = "mojo_system_impl"
22 29
23 sources = [ 30 sources = [
24 "async_waiter.cc", 31 "async_waiter.cc",
25 "async_waiter.h", 32 "async_waiter.h",
26 "awakable.h", 33 "awakable.h",
27 "awakable_list.cc", 34 "awakable_list.cc",
28 "awakable_list.h", 35 "awakable_list.h",
29 "channel.cc",
30 "channel.h",
31 "channel_endpoint.cc",
32 "channel_endpoint.h",
33 "channel_endpoint_client.h",
34 "channel_endpoint_id.cc",
35 "channel_endpoint_id.h",
36 "channel_id.h",
37 "channel_manager.cc",
38 "channel_manager.h",
39 "configuration.cc", 36 "configuration.cc",
40 "configuration.h", 37 "configuration.h",
41 "connection_identifier.h",
42 "connection_manager.cc",
43 "connection_manager.h",
44 "connection_manager_messages.h",
45 "core.cc", 38 "core.cc",
46 "core.h", 39 "core.h",
47 "data_pipe.cc", 40 "data_pipe.cc",
48 "data_pipe.h", 41 "data_pipe.h",
49 "data_pipe_consumer_dispatcher.cc", 42 "data_pipe_consumer_dispatcher.cc",
50 "data_pipe_consumer_dispatcher.h", 43 "data_pipe_consumer_dispatcher.h",
51 "data_pipe_impl.cc",
52 "data_pipe_impl.h",
53 "data_pipe_producer_dispatcher.cc", 44 "data_pipe_producer_dispatcher.cc",
54 "data_pipe_producer_dispatcher.h", 45 "data_pipe_producer_dispatcher.h",
55 "dispatcher.cc", 46 "dispatcher.cc",
56 "dispatcher.h", 47 "dispatcher.h",
57 "endpoint_relayer.cc",
58 "endpoint_relayer.h",
59 "handle_signals_state.h", 48 "handle_signals_state.h",
60 "handle_table.cc", 49 "handle_table.cc",
61 "handle_table.h", 50 "handle_table.h",
62 "incoming_endpoint.cc",
63 "incoming_endpoint.h",
64 "ipc_support.cc",
65 "ipc_support.h",
66 "local_data_pipe_impl.cc",
67 "local_data_pipe_impl.h",
68 "local_message_pipe_endpoint.cc",
69 "local_message_pipe_endpoint.h",
70 "mapping_table.cc", 51 "mapping_table.cc",
71 "mapping_table.h", 52 "mapping_table.h",
72 "master_connection_manager.cc", 53 "master_impl.cc",
73 "master_connection_manager.h", 54 "master_impl.h",
74 "memory.cc",
75 "memory.h",
76 "message_in_transit.cc", 55 "message_in_transit.cc",
77 "message_in_transit.h", 56 "message_in_transit.h",
78 "message_in_transit_queue.cc", 57 "message_in_transit_queue.cc",
79 "message_in_transit_queue.h", 58 "message_in_transit_queue.h",
80 "message_pipe.cc",
81 "message_pipe.h",
82 "message_pipe_dispatcher.cc", 59 "message_pipe_dispatcher.cc",
83 "message_pipe_dispatcher.h", 60 "message_pipe_dispatcher.h",
84 "message_pipe_endpoint.cc",
85 "message_pipe_endpoint.h",
86 "mutex.cc",
87 "mutex.h",
88 "options_validation.h", 61 "options_validation.h",
89 "platform_handle_dispatcher.cc", 62 "platform_handle_dispatcher.cc",
90 "platform_handle_dispatcher.h", 63 "platform_handle_dispatcher.h",
91 "process_identifier.h", 64 "process_identifier.h",
92 "proxy_message_pipe_endpoint.cc",
93 "proxy_message_pipe_endpoint.h",
94 "raw_channel.cc", 65 "raw_channel.cc",
95 "raw_channel.h", 66 "raw_channel.h",
96 "raw_channel_posix.cc", 67 "raw_channel_posix.cc",
97 "raw_channel_win.cc", 68 "raw_channel_win.cc",
98 "remote_consumer_data_pipe_impl.cc",
99 "remote_consumer_data_pipe_impl.h",
100 "remote_data_pipe_ack.h",
101 "remote_producer_data_pipe_impl.cc",
102 "remote_producer_data_pipe_impl.h",
103 "shared_buffer_dispatcher.cc", 69 "shared_buffer_dispatcher.cc",
104 "shared_buffer_dispatcher.h", 70 "shared_buffer_dispatcher.h",
105 "simple_dispatcher.cc", 71 "simple_dispatcher.cc",
106 "simple_dispatcher.h", 72 "simple_dispatcher.h",
107 "slave_connection_manager.cc",
108 "slave_connection_manager.h",
109 "thread_annotations.h",
110 "transport_data.cc", 73 "transport_data.cc",
111 "transport_data.h", 74 "transport_data.h",
112 "unique_identifier.cc",
113 "unique_identifier.h",
114 "waiter.cc", 75 "waiter.cc",
115 "waiter.h", 76 "waiter.h",
116 ] 77 ]
117 78
118 defines = [ 79 defines = [
119 "MOJO_SYSTEM_IMPL_IMPLEMENTATION", 80 "MOJO_SYSTEM_IMPL_IMPLEMENTATION",
120 "MOJO_SYSTEM_IMPLEMENTATION", 81 "MOJO_SYSTEM_IMPLEMENTATION",
121 ] 82 ]
122 83
123 all_dependent_configs = [ ":system_config" ] 84 all_dependent_configs = [ ":system_config" ]
124 85
125 public_deps = [ 86 public_deps = [
126 "../embedder", 87 "../embedder",
127 "../embedder:delegates", 88 "../embedder:delegates",
128 "../embedder:platform", 89 "../embedder:platform",
129 "../../public/c/system", 90 "../../../third_party/mojo/src/mojo/public/c/system",
130 "../../public/cpp/system", 91 "../../../third_party/mojo/src/mojo/public/cpp/system",
131 ] 92 ]
132 93
133 deps = [ 94 deps = [
134 "//base", 95 "//base",
135 "//base/third_party/dynamic_annotations", 96 "//base/third_party/dynamic_annotations",
97 ":master",
136 ] 98 ]
137 99
100 if (is_win) {
101 cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()),
102 # which is uninteresting.
103 }
104
138 allow_circular_includes_from = [ "../embedder" ] 105 allow_circular_includes_from = [ "../embedder" ]
139 } 106 }
140 107
141 group("tests") { 108 group("tests") {
142 testonly = true 109 testonly = true
143 deps = [ 110 deps = [
144 ":mojo_system_unittests", 111 # TODO(use_chrome_edk): remove "2"
145 ":mojo_message_pipe_perftests", 112 ":mojo_system_unittests2",
113 ":mojo_message_pipe_perftests2",
146 ] 114 ]
147 } 115 }
148 116
149 mojo_edk_source_set("test_utils") { 117 mojo_edk_source_set("test_utils") {
150 testonly = true 118 testonly = true
151 119
152 sources = [ 120 sources = [
153 "test_utils.cc", 121 "test_utils.cc",
154 "test_utils.h", 122 "test_utils.h",
155 ] 123 ]
156 124
157 mojo_sdk_public_deps = [ 125 public_deps = [
158 "mojo/public/c/system", 126 "//third_party/mojo/src/mojo/public/c/system",
159 "mojo/public/cpp/system", 127 "//third_party/mojo/src/mojo/public/cpp/system",
160 ] 128 ]
161 129
162 deps = [ 130 deps = [
163 "//base", 131 "//base",
164 "//base/test:test_support", 132 "//base/test:test_support",
133 "//mojo/edk/test:test_support",
134 "//testing/gtest:gtest",
165 ] 135 ]
166 } 136 }
167 137
168 test("mojo_system_unittests") { 138 # TODO(use_chrome_edk): remove "2"
139 test("mojo_system_unittests2") {
169 sources = [ 140 sources = [
170 "../test/multiprocess_test_helper_unittest.cc", 141 "../test/multiprocess_test_helper_unittest.cc",
171 "awakable_list_unittest.cc", 142 "awakable_list_unittest.cc",
172 "channel_endpoint_id_unittest.cc",
173 "channel_endpoint_unittest.cc",
174 "channel_manager_unittest.cc",
175 "channel_test_base.cc",
176 "channel_test_base.h",
177 "channel_unittest.cc",
178 "connection_manager_unittest.cc",
179 "core_test_base.cc", 143 "core_test_base.cc",
180 "core_test_base.h", 144 "core_test_base.h",
181 "core_unittest.cc", 145 "core_unittest.cc",
182 "data_pipe_impl_unittest.cc",
183 "data_pipe_unittest.cc", 146 "data_pipe_unittest.cc",
184 "dispatcher_unittest.cc", 147 "dispatcher_unittest.cc",
185 "endpoint_relayer_unittest.cc", 148 "master_impl_unittest.cc",
186 "ipc_support_unittest.cc", 149
187 "memory_unittest.cc",
188 "message_in_transit_queue_unittest.cc", 150 "message_in_transit_queue_unittest.cc",
189 "message_in_transit_test_utils.cc", 151 "message_in_transit_test_utils.cc",
190 "message_in_transit_test_utils.h", 152 "message_in_transit_test_utils.h",
191 "message_pipe_dispatcher_unittest.cc",
192 "message_pipe_test_utils.cc", 153 "message_pipe_test_utils.cc",
193 "message_pipe_test_utils.h", 154 "message_pipe_test_utils.h",
194 "message_pipe_unittest.cc", 155 "message_pipe_unittest.cc",
195 "multiprocess_message_pipe_unittest.cc", 156 "multiprocess_message_pipe_unittest.cc",
196 "mutex_unittest.cc",
197 "options_validation_unittest.cc", 157 "options_validation_unittest.cc",
198 "platform_handle_dispatcher_unittest.cc", 158 "platform_handle_dispatcher_unittest.cc",
159
199 "raw_channel_unittest.cc", 160 "raw_channel_unittest.cc",
200 "remote_data_pipe_impl_unittest.cc",
201 "remote_message_pipe_unittest.cc",
202 "run_all_unittests.cc", 161 "run_all_unittests.cc",
203 "shared_buffer_dispatcher_unittest.cc", 162 "shared_buffer_dispatcher_unittest.cc",
204 "simple_dispatcher_unittest.cc", 163 "simple_dispatcher_unittest.cc",
205 "test_channel_endpoint_client.cc",
206 "test_channel_endpoint_client.h",
207 "thread_annotations_unittest.cc",
208 "unique_identifier_unittest.cc",
209 "waiter_test_utils.cc", 164 "waiter_test_utils.cc",
210 "waiter_test_utils.h", 165 "waiter_test_utils.h",
211 "waiter_unittest.cc", 166 "waiter_unittest.cc",
212 ] 167 ]
213 168
214 deps = [ 169 deps = [
215 ":system", 170 ":system",
216 ":test_utils", 171 ":test_utils",
217 "../embedder:embedder_unittests", 172
173 # TODO(use_chrome_edk): remove "2"
174 "../embedder:embedder_unittests2",
175 "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone",
218 "../test:test_support", 176 "../test:test_support",
219 "//base", 177 "//base",
220 "//base/test:test_support", 178 "//base/test:test_support",
221 "//testing/gtest", 179 "//testing/gtest",
222 ] 180 ]
223 181
224 allow_circular_includes_from = [ "../embedder:embedder_unittests" ] 182 # TODO(use_chrome_edk): remove "2"
183 allow_circular_includes_from = [ "../embedder:embedder_unittests2" ]
225 } 184 }
226 185
227 test("mojo_message_pipe_perftests") { 186 # TODO(use_chrome_edk): remove "2"
187 test("mojo_message_pipe_perftests2") {
228 sources = [ 188 sources = [
229 "message_pipe_perftest.cc", 189 "message_pipe_perftest.cc",
230 "message_pipe_test_utils.cc", 190 "message_pipe_test_utils.cc",
231 "message_pipe_test_utils.h", 191 "message_pipe_test_utils.h",
232 ] 192 ]
233 193
234 deps = [ 194 deps = [
235 ":system", 195 ":system",
236 ":test_utils", 196 ":test_utils",
237 "../test:test_support", 197 "../test:test_support",
198 "../test:run_all_perftests",
199 "../../../third_party/mojo/src/mojo/public/cpp/environment:standalone",
238 "//base", 200 "//base",
239 "//base/test:test_support", 201 "//base/test:test_support",
240 "//base/test:test_support_perf", 202
203 #"//base/test:test_support_perf",
241 "//testing/gtest", 204 "//testing/gtest",
242 ] 205 ]
243 } 206 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698