Add ICU message format support
[chromium-blink-merge.git] / ipc / BUILD.gn
blobc56559f6e3c8677fffbae68931a9b510a21afe02
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//testing/test.gni")
7 component("ipc") {
8   sources = [
9     "attachment_broker.cc",
10     "attachment_broker.h",
11     "attachment_broker_messages.h",
12     "attachment_broker_privileged.cc",
13     "attachment_broker_privileged.h",
14     "attachment_broker_privileged_win.cc",
15     "attachment_broker_privileged_win.h",
16     "attachment_broker_unprivileged.cc",
17     "attachment_broker_unprivileged.h",
18     "attachment_broker_unprivileged_win.cc",
19     "attachment_broker_unprivileged_win.h",
20     "brokerable_attachment.cc",
21     "brokerable_attachment.h",
22     "handle_attachment_win.cc",
23     "handle_attachment_win.h",
24     "ipc_channel.cc",
25     "ipc_channel.h",
26     "ipc_channel_common.cc",
27     "ipc_channel_factory.cc",
28     "ipc_channel_factory.h",
29     "ipc_channel_handle.h",
30     "ipc_channel_nacl.cc",
31     "ipc_channel_nacl.h",
32     "ipc_channel_posix.cc",
33     "ipc_channel_posix.h",
34     "ipc_channel_proxy.cc",
35     "ipc_channel_proxy.h",
36     "ipc_channel_reader.cc",
37     "ipc_channel_reader.h",
38     "ipc_channel_win.cc",
39     "ipc_channel_win.h",
40     "ipc_descriptors.h",
41     "ipc_export.h",
42     "ipc_handle_win.cc",
43     "ipc_handle_win.h",
44     "ipc_listener.h",
45     "ipc_logging.cc",
46     "ipc_logging.h",
47     "ipc_message.cc",
48     "ipc_message.h",
49     "ipc_message_attachment.cc",
50     "ipc_message_attachment.h",
51     "ipc_message_attachment_set.cc",
52     "ipc_message_attachment_set.h",
53     "ipc_message_generator.cc",
54     "ipc_message_generator.h",
55     "ipc_message_macros.h",
56     "ipc_message_start.h",
57     "ipc_message_utils.cc",
58     "ipc_message_utils.h",
59     "ipc_param_traits.h",
60     "ipc_platform_file.cc",
61     "ipc_platform_file.h",
62     "ipc_platform_file_attachment_posix.cc",
63     "ipc_platform_file_attachment_posix.h",
64     "ipc_sender.h",
65     "ipc_switches.cc",
66     "ipc_switches.h",
67     "ipc_sync_channel.cc",
68     "ipc_sync_channel.h",
69     "ipc_sync_message.cc",
70     "ipc_sync_message.h",
71     "ipc_sync_message_filter.cc",
72     "ipc_sync_message_filter.h",
73     "message_filter.cc",
74     "message_filter.h",
75     "message_filter_router.cc",
76     "message_filter_router.h",
77     "param_traits_log_macros.h",
78     "param_traits_macros.h",
79     "param_traits_read_macros.h",
80     "param_traits_write_macros.h",
81     "struct_constructor_macros.h",
82     "struct_destructor_macros.h",
83     "unix_domain_socket_util.cc",
84     "unix_domain_socket_util.h",
85   ]
87   if (is_nacl) {
88     sources -= [
89       "ipc_channel.cc",
90       "ipc_channel_posix.cc",
91       "unix_domain_socket_util.cc",
92     ]
93   } else {
94     sources -= [
95       "ipc_channel_nacl.cc",
96       "ipc_channel_nacl.h",
97     ]
98   }
100   if (is_win || is_ios) {
101     sources -= [ "unix_domain_socket_util.cc" ]
102   }
104   defines = [ "IPC_IMPLEMENTATION" ]
106   deps = [
107     "//base",
109     # TODO(viettrungluu): Needed for base/lazy_instance.h, which is suspect.
110     "//base/third_party/dynamic_annotations",
111     "//crypto:crypto",
112   ]
115 # TODO(GYP): crbug.com/360936. Get this to build and run on Android.
116 if (!is_android) {
117   group("ipc_tests_run") {
118     testonly = true
119     deps = [
120       ":ipc_tests",
121     ]
122   }
124   test("ipc_tests") {
125     sources = [
126       "attachment_broker_privileged_win_unittest.cc",
127       "attachment_broker_unprivileged_win_unittest.cc",
128       "ipc_channel_posix_unittest.cc",
129       "ipc_channel_reader_unittest.cc",
130       "ipc_channel_unittest.cc",
131       "ipc_fuzzing_tests.cc",
132       "ipc_message_attachment_set_posix_unittest.cc",
133       "ipc_message_unittest.cc",
134       "ipc_message_utils_unittest.cc",
135       "ipc_send_fds_test.cc",
136       "ipc_sync_channel_unittest.cc",
137       "ipc_sync_message_unittest.cc",
138       "ipc_sync_message_unittest.h",
139       "sync_socket_unittest.cc",
140       "unix_domain_socket_util_unittest.cc",
141     ]
143     if (is_win || is_ios) {
144       sources -= [ "unix_domain_socket_util_unittest.cc" ]
145     }
147     # TODO(brettw) hook up Android testing.
148     #if (is_android && gtest_target_type == "shared_library") {
149     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
150     #}
152     # TODO(brettw) hook up tcmalloc to this target.
153     #if (is_posix && !is_mac && !is_android) {
154     #  if (use_allocator!="none") {
155     #    deps += "/base/allocator"
156     #  }
157     #}
159     deps = [
160       ":ipc",
161       ":test_support",
162       "//base",
163       "//base:i18n",
164       "//base/test:run_all_unittests",
165       "//base/test:test_support",
166       "//testing/gtest",
167     ]
168   }
170   test("ipc_perftests") {
171     sources = [
172       "ipc_perftests.cc",
173     ]
175     # TODO(brettw) hook up Android testing.
176     #if (is_android && gtest_target_type == "shared_library") {
177     #  deps += "/testing/android/native_test.gyp:native_testNative_code"
178     #}
180     # TODO(brettw) hook up tcmalloc to this target.
181     #if (is_posix && !is_mac && !is_android) {
182     #  if (use_allocator!="none") {
183     #    deps += "//base/allocator"
184     #  }
185     #}
186     deps = [
187       ":ipc",
188       ":test_support",
189       "//base",
190       "//base:i18n",
191       "//base/test:test_support",
192       "//base/test:test_support_perf",
193       "//testing/gtest",
194     ]
195   }
198 static_library("test_support") {
199   testonly = true
200   sources = [
201     "ipc_multiprocess_test.cc",
202     "ipc_multiprocess_test.h",
203     "ipc_perftest_support.cc",
204     "ipc_perftest_support.h",
205     "ipc_security_test_util.cc",
206     "ipc_security_test_util.h",
207     "ipc_test_base.cc",
208     "ipc_test_base.h",
209     "ipc_test_channel_listener.cc",
210     "ipc_test_channel_listener.h",
211     "ipc_test_sink.cc",
212     "ipc_test_sink.h",
213   ]
214   deps = [
215     ":ipc",
216     "//base",
217     "//base/test:test_support",
218     "//testing/gtest",
219   ]