Widen valgrind suppression to cover all WebDataConsumerHandleImplTests.
[chromium-blink-merge.git] / mojo / mojo_base.gyp
blob72c89b3d409b19c36eac7bb8cae0f129ba90e1ae
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
3 # found in the LICENSE file.
5 # Essential components (and their tests) that are needed to build
6 # Chrome should be here.  Other components that are useful only in
7 # Mojo land like mojo_shell should be in mojo.gyp.
9   'includes': [
10     'mojo_variables.gypi',
11   ],
12   'targets': [
13     {
14       'target_name': 'mojo_base',
15       'type': 'none',
16       'dependencies': [
17         # NOTE: If adding a new dependency here, please consider whether it
18         # should also be added to the list of Mojo-related dependencies of
19         # build/all.gyp:All on iOS, as All cannot depend on the mojo_base
20         # target on iOS due to the presence of the js targets, which cause v8
21         # to be built.
22         'mojo_common_lib',
23         'mojo_common_unittests',
24       ],
25       'conditions': [
26         ['OS == "android"', {
27           'dependencies': [
28             'public/mojo_public.gyp:mojo_bindings_java',
29             'public/mojo_public.gyp:mojo_public_java',
30           ],
31         }],
32       ]
33     },
34     {
35       'target_name': 'mojo_none',
36       'type': 'none',
37     },
38     {
39       # GN version: //mojo/common
40       'target_name': 'mojo_common_lib',
41       'type': '<(component)',
42       'defines': [
43         'MOJO_COMMON_IMPLEMENTATION',
44       ],
45       'dependencies': [
46         '../base/base.gyp:base',
47         '../url/url.gyp:url_lib',
48         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
49         '<(mojo_system_for_component)',
50       ],
51       'export_dependent_settings': [
52         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
53       ],
54       'sources': [
55         'common/common_type_converters.cc',
56         'common/common_type_converters.h',
57         'common/data_pipe_utils.cc',
58         'common/data_pipe_utils.h',
59         'common/handle_watcher.cc',
60         'common/handle_watcher.h',
61         'common/message_pump_mojo.cc',
62         'common/message_pump_mojo.h',
63         'common/message_pump_mojo_handler.h',
64         'common/time_helper.cc',
65         'common/time_helper.h',
66       ],
67     },
68     {
69       # GN version: //mojo/common:mojo_common_unittests
70       'target_name': 'mojo_common_unittests',
71       'type': 'executable',
72       'dependencies': [
73         '../base/base.gyp:base',
74         '../base/base.gyp:base_message_loop_tests',
75         '../testing/gtest.gyp:gtest',
76         '../url/url.gyp:url_lib',
77         'edk/mojo_edk.gyp:mojo_common_test_support',
78         'edk/mojo_edk.gyp:mojo_run_all_unittests',
79         'mojo_common_lib',
80         'mojo_environment_chromium',
81         'public/mojo_public.gyp:mojo_cpp_bindings',
82         'public/mojo_public.gyp:mojo_public_test_utils',
83       ],
84       'sources': [
85         'common/common_type_converters_unittest.cc',
86         'common/handle_watcher_unittest.cc',
87         'common/message_pump_mojo_unittest.cc',
88         'edk/test/multiprocess_test_helper_unittest.cc',
89       ],
90       'conditions': [
91         ['OS=="ios"', {
92           'sources!': [
93             'edk/test/multiprocess_test_helper_unittest.cc',
94           ],
95         }],
96       ],
97     },
98     {
99       # GN version: //mojo/environment:chromium
100       'target_name': 'mojo_environment_chromium',
101       'type': 'static_library',
102       'dependencies': [
103         'mojo_environment_chromium_impl',
104       ],
105       'sources': [
106         'environment/environment.cc',
107         # TODO(vtl): This is kind of ugly. (See TODO in logging.h.)
108         "public/cpp/environment/logging.h",
109         "public/cpp/environment/lib/logging.cc",
110       ],
111       'include_dirs': [
112         '..',
113       ],
114       'export_dependent_settings': [
115         'mojo_environment_chromium_impl',
116       ],
117     },
118     {
119       # GN version: //mojo/environment:chromium_impl
120       'target_name': 'mojo_environment_chromium_impl',
121       'type': '<(component)',
122       'defines': [
123         'MOJO_ENVIRONMENT_IMPL_IMPLEMENTATION',
124       ],
125       'dependencies': [
126         '../base/base.gyp:base',
127         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
128         'mojo_common_lib',
129         '<(mojo_system_for_component)',
130       ],
131       'sources': [
132         'environment/default_async_waiter_impl.cc',
133         'environment/default_async_waiter_impl.h',
134         'environment/default_logger_impl.cc',
135         'environment/default_logger_impl.h',
136       ],
137       'include_dirs': [
138         '..',
139       ],
140     },
141     {
142      # GN version: //mojo/application
143      'target_name': 'mojo_application_chromium',
144      'type': 'static_library',
145      'sources': [
146        'application/application_runner_chromium.cc',
147        'application/application_runner_chromium.h',
148       ],
149       'dependencies': [
150         'mojo_common_lib',
151         'mojo_environment_chromium',
152         'public/mojo_public.gyp:mojo_application_base',
153        ],
154       'export_dependent_settings': [
155         'public/mojo_public.gyp:mojo_application_base',
156        ],
157     },
158     {
159       # GN version: //mojo/bindings/js
160       'target_name': 'mojo_js_bindings_lib',
161       'type': 'static_library',
162       'dependencies': [
163         '../base/base.gyp:base',
164         '../gin/gin.gyp:gin',
165         '../v8/tools/gyp/v8.gyp:v8',
166         'mojo_common_lib',
167       ],
168       'export_dependent_settings': [
169         '../base/base.gyp:base',
170         '../gin/gin.gyp:gin',
171         'mojo_common_lib',
172       ],
173       'sources': [
174         # Sources list duplicated in GN build.
175         'bindings/js/core.cc',
176         'bindings/js/core.h',
177         'bindings/js/drain_data.cc',
178         'bindings/js/drain_data.h',
179         'bindings/js/handle.cc',
180         'bindings/js/handle.h',
181         'bindings/js/handle_close_observer.h',
182         'bindings/js/support.cc',
183         'bindings/js/support.h',
184         'bindings/js/waiting_callback.cc',
185         'bindings/js/waiting_callback.h',
186       ],
187     },
188   ],
189   'conditions': [
190     ['OS=="android"', {
191       'targets': [
192         {
193           'target_name': 'mojo_jni_headers',
194           'type': 'none',
195           'dependencies': [
196             'mojo_java_set_jni_headers',
197           ],
198           'sources': [
199             'android/javatests/src/org/chromium/mojo/MojoTestCase.java',
200             'android/javatests/src/org/chromium/mojo/bindings/ValidationTestUtil.java',
201             'android/system/src/org/chromium/mojo/system/impl/CoreImpl.java',
202           ],
203           'variables': {
204             'jni_gen_package': 'mojo',
205           },
206           'includes': [ '../build/jni_generator.gypi' ],
207         },
208         {
209           'target_name': 'libmojo_system_java',
210           'type': 'static_library',
211           'dependencies': [
212             '../base/base.gyp:base',
213             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
214             'edk/mojo_edk.gyp:mojo_system_impl',
215             'mojo_common_lib',
216             'mojo_environment_chromium',
217             'mojo_jni_headers',
218           ],
219           'sources': [
220             'android/system/core_impl.cc',
221             'android/system/core_impl.h',
222           ],
223         },
224         {
225           'target_name': 'mojo_java_set_jni_headers',
226           'type': 'none',
227           'variables': {
228             'jni_gen_package': 'mojo',
229             'input_java_class': 'java/util/HashSet.class',
230           },
231           'includes': [ '../build/jar_file_jni_generator.gypi' ],
232         },
233         {
234           'target_name': 'mojo_system_java',
235           'type': 'none',
236           'dependencies': [
237             '../base/base.gyp:base_java',
238             'libmojo_system_java',
239             'public/mojo_public.gyp:mojo_public_java',
240           ],
241           'variables': {
242             'java_in_dir': '<(DEPTH)/mojo/android/system',
243           },
244           'includes': [ '../build/java.gypi' ],
245         },
246       ]
247     }]
248   ]