Fix the following browser_tests in the Linux GN build.
[chromium-blink-merge.git] / content / content.gyp
blob3d73378c51bbd5de8acd08c7cadd3e53fe909b81
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.
6   'variables': {
7     'chromium_code': 1,  # Use higher warning level.
8     'chromium_enable_vtune_jit_for_v8%': 0,  # enable the vtune support for V8 engine.
9     'directxsdk_exists': '<!pymod_do_main(dir_exists ../third_party/directxsdk)',
10   },
11   'target_defaults': {
12     'defines': ['CONTENT_IMPLEMENTATION'],
13     'conditions': [
14       # TODO(jschuh): Remove this after crbug.com/173851 gets fixed.
15       ['OS=="win" and target_arch=="x64"', {
16         'msvs_settings': {
17           'VCCLCompilerTool': {
18             'AdditionalOptions': ['/bigobj'],
19           },
20         },
21       }],
22     ],
23   },
24   'conditions': [
25     ['OS != "ios"', {
26       'includes': [
27         '../build/win_precompile.gypi',
28         'content_resources.gypi',
29       ],
30     }],
31     ['OS == "win"', {
32       'targets': [
33         {
34           'target_name': 'content_startup_helper_win',
35           'type': 'static_library',
36           'include_dirs': [
37             '..',
38           ],
39           'dependencies': [
40             '../base/base.gyp:base',
41             '../base/base.gyp:base_i18n',
42             '../sandbox/sandbox.gyp:sandbox',
43           ],
44           'sources': [
45             'app/startup_helper_win.cc',
46             'public/app/startup_helper_win.h',
47           ],
48         }
49       ],
50     }],
51     # In component mode, we build all of content as a single DLL.
52     # However, in the static mode, we need to build content as multiple
53     # targets in order to prevent dependencies from getting introduced
54     # upstream unnecessarily (e.g., content_renderer depends on allocator
55     # and chrome_exe depends on content_common but we don't want
56     # chrome_exe to have to depend on allocator).
57     ['component=="static_library"', {
58       'target_defines': [
59         'COMPILE_CONTENT_STATICALLY',
60       ],
61       'targets': [
62         {
63           # GN version: //content
64           'target_name': 'content',
65           'type': 'none',
66           'dependencies': [
67             'content_browser',
68             'content_common',
69           ],
70           'export_dependent_settings': [
71             'content_common',
72           ],
73           'conditions': [
74             ['OS != "ios"', {
75               'dependencies': [
76                 'content_child',
77                 'content_gpu',
78                 'content_plugin',
79                 'content_ppapi_plugin',
80                 'content_renderer',
81                 'content_utility',
82               ],
83             }],
84           ],
85         },
86         {
87           # GN version: //content/app:browser
88           'target_name': 'content_app_browser',
89           'type': 'static_library',
90           'variables': { 'enable_wexit_time_destructors': 1, },
91           'includes': [
92             'content_app.gypi',
93           ],
94           'dependencies': [
95             'content_common',
96           ],
97           'export_dependent_settings': [
98             'content_common',
99           ],
100           'conditions': [
101             ['chrome_multiple_dll', {
102               'defines': [
103                 'CHROME_MULTIPLE_DLL_BROWSER',
104               ],
105             }],
106           ],
107         },
108         {
109           # GN version: //content/app:child
110           'target_name': 'content_app_child',
111           'type': 'static_library',
112           'variables': { 'enable_wexit_time_destructors': 1, },
113           'includes': [
114             'content_app.gypi',
115           ],
116           'dependencies': [
117             'content_common',
118           ],
119           'export_dependent_settings': [
120             'content_common',
121           ],
122           'conditions': [
123             ['chrome_multiple_dll', {
124               'defines': [
125                 'CHROME_MULTIPLE_DLL_CHILD',
126               ],
127             }],
128           ],
129         },
130         {
131           # GN version: //content/app:both
132           'target_name': 'content_app_both',
133           'type': 'static_library',
134           'variables': { 'enable_wexit_time_destructors': 1, },
135           'includes': [
136             'content_app.gypi',
137           ],
138           'dependencies': [
139             'content_common',
140           ],
141           'export_dependent_settings': [
142             'content_common',
143           ],
144         },
145         {
146           # GN version: //content/browser and //content/public/browser
147           'target_name': 'content_browser',
148           'type': 'static_library',
149           'variables': { 'enable_wexit_time_destructors': 1, },
150           'includes': [
151             'content_browser.gypi',
152             # Disable LTO due to ELF section name out of range
153             # crbug.com/422251
154             '../build/android/disable_lto.gypi',
155           ],
156           'dependencies': [
157             'content_common',
158           ],
159           'export_dependent_settings': [
160             'content_common',
161           ],
162           'conditions': [
163             ['java_bridge==1', {
164               'dependencies': [
165                 'content_child',
166               ]
167             }],
168             ['OS=="android"', {
169               'dependencies': [
170                 'content_gpu',
171                 'content_utility',
172               ],
173             }],
174             ['OS != "ios"', {
175               'dependencies': [
176                 'content_resources',
177               ],
178             }],
179           ],
180         },
181         {
182           # GN version: //content/common and //content/public/common
183           'target_name': 'content_common',
184           'type': 'static_library',
185           'variables': { 'enable_wexit_time_destructors': 1, },
186           'includes': [
187             'content_common.gypi',
188           ],
189           'conditions': [
190             ['OS != "ios"', {
191               'dependencies': [
192                 'content_resources',
193               ],
194             }],
195           ],
196           # Disable c4267 warnings until we fix size_t to int truncations.
197           'msvs_disabled_warnings': [ 4267, ],
198         },
199       ],
200       'conditions': [
201         ['OS != "ios"', {
202           'targets': [
203             {
204               # GN version: //content/child and //content/public/child
205               'target_name': 'content_child',
206               'type': 'static_library',
207               'variables': { 'enable_wexit_time_destructors': 1, },
208               'includes': [
209                 'content_child.gypi',
210               ],
211               'dependencies': [
212                 'content_resources',
213               ],
214               # Disable c4267 warnings until we fix size_t to int truncations.
215               'msvs_disabled_warnings': [ 4267, ],
216             },
217             {
218               # GN version: //content/gpu
219               'target_name': 'content_gpu',
220               'type': 'static_library',
221               'variables': { 'enable_wexit_time_destructors': 1, },
222               'includes': [
223                 'content_gpu.gypi',
224               ],
225               'dependencies': [
226                 'content_child',
227                 'content_common',
228               ],
229             },
230             {
231               # GN version: //content/plugin and //content/public/plugin
232               'target_name': 'content_plugin',
233               'type': 'static_library',
234               'variables': { 'enable_wexit_time_destructors': 1, },
235               'includes': [
236                 'content_plugin.gypi',
237               ],
238               'dependencies': [
239                 'content_child',
240                 'content_common',
241               ],
242             },
243             {
244               # GN version: //content/ppapi_plugin
245               'target_name': 'content_ppapi_plugin',
246               'type': 'static_library',
247               'variables': { 'enable_wexit_time_destructors': 1, },
248               'includes': [
249                 'content_ppapi_plugin.gypi',
250               ],
251               # Disable c4267 warnings until we fix size_t to int truncations.
252               'msvs_disabled_warnings': [ 4267, ],
253             },
254             {
255               # GN version: //content/renderer and //content/public/renderer
256               'target_name': 'content_renderer',
257               'type': 'static_library',
258               'variables': { 'enable_wexit_time_destructors': 1, },
259               'includes': [
260                 'content_renderer.gypi',
261               ],
262               'dependencies': [
263                 'content_child',
264                 'content_common',
265                 'content_resources',
266               ],
267               'export_dependent_settings': [
268                 'content_common',
269               ],
270               'conditions': [
271                 ['chromium_enable_vtune_jit_for_v8==1', {
272                   'dependencies': [
273                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
274                   ],
275                 }],
276               ],
277             },
278             {
279               # GN version: //content/utility and //content/public/utility
280               'target_name': 'content_utility',
281               'type': 'static_library',
282               'variables': { 'enable_wexit_time_destructors': 1, },
283               'includes': [
284                 'content_utility.gypi',
285               ],
286               'dependencies': [
287                 'content_child',
288                 'content_common',
289               ],
290             },
291           ],
292         }],
293       ],
294     },
295     {  # component != static_library
296       'targets': [
297         {
298           # GN version: //content
299           'target_name': 'content',
300           'type': 'shared_library',
301           'variables': { 'enable_wexit_time_destructors': 1, },
302           'dependencies': [
303             'content_resources',
304           ],
305           'conditions': [
306             ['chromium_enable_vtune_jit_for_v8==1', {
307               'dependencies': [
308                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
309               ],
310             }],
311           ],
312           'includes': [
313             'content_app.gypi',
314             'content_browser.gypi',
315             'content_child.gypi',
316             'content_common.gypi',
317             'content_gpu.gypi',
318             'content_plugin.gypi',
319             'content_ppapi_plugin.gypi',
320             'content_renderer.gypi',
321             'content_utility.gypi',
322           ],
323           'msvs_settings': {
324             'VCLinkerTool': {
325               'conditions': [
326                 ['incremental_chrome_dll==1', {
327                   'UseLibraryDependencyInputs': "true",
328                 }],
329               ],
330             },
331           },
332         },
333         {
334           # GN version: //content/app:browser
335           'target_name': 'content_app_browser',
336           'type': 'none',
337           'dependencies': ['content', 'content_browser'],
338         },
339         {
340           # GN version: //content/app:child
341           'target_name': 'content_app_child',
342           'type': 'none',
343           'dependencies': ['content', 'content_child'],
344         },
345         {
346           # GN version: //content/app:both
347           'target_name': 'content_app_both',
348           'type': 'none',
349           'dependencies': ['content'],
350           'export_dependent_settings': ['content'],
351         },
352         {
353           # GN version: //content/browser and //content/public/browser
354           'target_name': 'content_browser',
355           'type': 'none',
356           'dependencies': ['content'],
357           'export_dependent_settings': ['content'],
358         },
359         {
360           # GN version: //content/common and //content/public/common
361           'target_name': 'content_common',
362           'type': 'none',
363           'dependencies': ['content', 'content_resources'],
364           # Disable c4267 warnings until we fix size_t to int truncations.
365           'msvs_disabled_warnings': [ 4267, ],
366           'export_dependent_settings': ['content'],
367         },
368         {
369           # GN Version: //content/child
370           'target_name': 'content_child',
371           'type': 'none',
372           'dependencies': ['content'],
373         },
374         {
375           # GN version: //content/gpu
376           'target_name': 'content_gpu',
377           'type': 'none',
378           'dependencies': ['content'],
379         },
380         {
381           # GN version: //content/plugin
382           'target_name': 'content_plugin',
383           'type': 'none',
384           'dependencies': ['content'],
385         },
386         {
387           # GN version: //content/ppapi_plugin
388           'target_name': 'content_ppapi_plugin',
389           'type': 'none',
390           'dependencies': ['content'],
391           # Disable c4267 warnings until we fix size_t to int truncations.
392           'msvs_disabled_warnings': [ 4267, ],
393         },
394         {
395           # GN version: //content/renderer and //content/public/renderer
396           'target_name': 'content_renderer',
397           'type': 'none',
398           'dependencies': ['content'],
399           'export_dependent_settings': ['content'],
400         },
401         {
402           # GN version: //content/utility
403           'target_name': 'content_utility',
404           'type': 'none',
405           'dependencies': ['content'],
406           'export_dependent_settings': ['content'],
407         },
408       ],
409     }],
410     ['OS == "android"', {
411       'targets': [
412         {
413           'target_name': 'common_aidl',
414           'type': 'none',
415           'variables': {
416             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
417             'aidl_import_include': 'public/android/java/src',
418           },
419           'sources': [
420             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
421             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
422           ],
423           'includes': [ '../build/java_aidl.gypi' ],
424         },
425         {
426           'target_name': 'content_java',
427           'type': 'none',
428           'dependencies': [
429             '../base/base.gyp:base',
430             '../device/battery/battery.gyp:device_battery_java',
431             '../device/vibration/vibration.gyp:device_vibration_java',
432             '../media/media.gyp:media_java',
433             '../mojo/mojo_base.gyp:mojo_system_java',
434             '../net/net.gyp:net',
435             '../third_party/mojo/mojo_public.gyp:mojo_application_bindings',
436             '../third_party/mojo/mojo_public.gyp:mojo_bindings_java',
437             '../ui/android/ui_android.gyp:ui_java',
438             '../ui/touch_selection/ui_touch_selection.gyp:selection_event_type_java',
439             '../ui/touch_selection/ui_touch_selection.gyp:touch_handle_orientation_java',
440             '../third_party/WebKit/public/blink_headers.gyp:blink_headers_java',
441             'common_aidl',
442             'console_message_level_java',
443             'content_common',
444             'content_strings_grd',
445             'content_gamepad_mapping',
446             'gesture_event_type_java',
447             'invalidate_types_java',
448             'navigation_controller_java',
449             'popup_item_type_java',
450             'result_codes_java',
451             'speech_recognition_error_java',
452             'top_controls_state_java',
453             'screen_orientation_values_java',
454           ],
455           'variables': {
456             'java_in_dir': '../content/public/android/java',
457             'has_java_resources': 1,
458             'R_package': 'org.chromium.content',
459             'R_package_relpath': 'org/chromium/content',
460           },
461           'includes': [ '../build/java.gypi' ],
462         },
463         {
464           'target_name': 'console_message_level_java',
465           'type': 'none',
466           'variables': {
467             'source_file': 'public/common/console_message_level.h',
468           },
469           'includes': [ '../build/android/java_cpp_enum.gypi' ],
470         },
471         {
472           'target_name': 'content_strings_grd',
473           # The android_webview/Android.mk file depends on this target directly.
474           'android_unmangled_name': 1,
475           'type': 'none',
476           'variables': {
477             'grd_file': '../content/public/android/java/strings/android_content_strings.grd',
478           },
479           'includes': [
480             '../build/java_strings_grd.gypi',
481           ],
482         },
483         {
484           'target_name': 'content_gamepad_mapping',
485           'type': 'none',
486           'variables': {
487             'source_file': 'browser/gamepad/gamepad_standard_mappings.h',
488           },
489           'includes': [ '../build/android/java_cpp_enum.gypi' ],
490         },
491         {
492           'target_name': 'gesture_event_type_java',
493           'type': 'none',
494           'variables': {
495             'source_file': 'browser/android/gesture_event_type.h',
496           },
497           'includes': [ '../build/android/java_cpp_enum.gypi' ],
498         },
499         {
500           'target_name': 'invalidate_types_java',
501           'type': 'none',
502           'variables': {
503             'source_file': 'public/browser/invalidate_type.h',
504           },
505           'includes': [ '../build/android/java_cpp_enum.gypi' ],
506         },
507         {
508           'target_name': 'navigation_controller_java',
509           'type': 'none',
510           'variables': {
511             'source_file': 'public/browser/navigation_controller.h',
512           },
513           'includes': [ '../build/android/java_cpp_enum.gypi' ],
514         },
515         {
516           'target_name': 'popup_item_type_java',
517           'type': 'none',
518           'variables': {
519             'source_file': 'browser/android/content_view_core_impl.cc',
520           },
521           'includes': [ '../build/android/java_cpp_enum.gypi' ],
522         },
523         {
524           'target_name': 'result_codes_java',
525           'type': 'none',
526           'variables': {
527             'source_file': 'public/common/result_codes.h',
528           },
529           'includes': [ '../build/android/java_cpp_enum.gypi' ],
530         },
531         {
532           'target_name': 'speech_recognition_error_java',
533           'type': 'none',
534           'variables': {
535             'source_file': 'public/common/speech_recognition_error.h',
536           },
537           'includes': [ '../build/android/java_cpp_enum.gypi' ],
538         },
539         {
540           'target_name': 'top_controls_state_java',
541           'type': 'none',
542           'variables': {
543             'source_file': 'public/common/top_controls_state.h',
544           },
545           'includes': [ '../build/android/java_cpp_enum.gypi' ],
546         },
547         {
548           'target_name': 'screen_orientation_values_java',
549           'type': 'none',
550           'variables': {
551             'source_file': 'public/common/screen_orientation_values.h',
552           },
553           'includes': [ '../build/android/java_cpp_enum.gypi' ],
554         },
555         {
556           'target_name': 'java_set_jni_headers',
557           'type': 'none',
558           'variables': {
559             'jni_gen_package': 'content',
560             'input_java_class': 'java/util/HashSet.class',
561           },
562           'includes': [ '../build/jar_file_jni_generator.gypi' ],
563         },
564         {
565           'target_name': 'motionevent_jni_headers',
566           'type': 'none',
567           'variables': {
568              'jni_gen_package': 'content',
569              'input_java_class': 'android/view/MotionEvent.class',
570            },
571           'includes': [ '../build/jar_file_jni_generator.gypi' ],
572         },
573         {
574           'target_name': 'content_jni_headers',
575           'type': 'none',
576           'dependencies': [
577             'java_set_jni_headers',
578             'motionevent_jni_headers'
579           ],
580           'includes': [ 'content_jni.gypi' ],
581         },
582         {
583           'target_name': 'content_icudata',
584           'type': 'none',
585           'conditions': [
586             ['icu_use_data_file_flag==1', {
587               'copies': [
588                 {
589                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
590                   'files': [
591                     '<(PRODUCT_DIR)/icudtl.dat',
592                   ],
593                 },
594               ],
595             }],
596           ],
597         },
598         {
599           'target_name': 'content_v8_external_data',
600           'type': 'none',
601           'conditions': [
602             ['v8_use_external_startup_data==1', {
603               'copies': [
604                 {
605                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
606                   'files': [
607                     '<(PRODUCT_DIR)/natives_blob.bin',
608                     '<(PRODUCT_DIR)/snapshot_blob.bin',
609                   ],
610                 },
611               ],
612             }],
613           ],
614         },
615       ],
616     }],  # OS == "android"
617   ],