Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / core.gyp
1 #
2 # Copyright (C) 2009 Google Inc. All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met:
7 #
8 #     * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 #     * Redistributions in binary form must reproduce the above
11 # copyright notice, this list of conditions and the following disclaimer
12 # in the documentation and/or other materials provided with the
13 # distribution.
14 #     * Neither the name of Google Inc. nor the names of its
15 # contributors may be used to endorse or promote products derived from
16 # this software without specific prior written permission.
17 #
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #
30
31 {
32   'includes': [
33     '../build/win/precompile.gypi',
34     '../build/features.gypi',
35     '../build/scripts/scripts.gypi',
36     '../bindings/core/core.gypi',  # core can depend on bindings/core, but not on bindings
37     'core.gypi',
38   ],
39
40   'variables': {
41     'enable_wexit_time_destructors': 1,
42
43     'webcore_include_dirs': [
44       '..',  # WebKit/Source
45       '<(SHARED_INTERMEDIATE_DIR)/blink',  # gen/blink
46     ],
47
48     'conditions': [
49       ['OS=="android" and use_openmax_dl_fft!=0', {
50         'webcore_include_dirs': [
51           '<(DEPTH)/third_party/openmax_dl'
52         ]
53       }],
54     ],
55   },  # variables
56
57   'target_defaults': {
58     'variables': {
59       'optimize': 'max',
60     },
61   },
62
63   'targets': [
64     {
65       # GN version: //third_party/WebKit/Source/core/inspector:protocol_sources
66       'target_name': 'inspector_protocol_sources',
67       'type': 'none',
68       'dependencies': [
69         'generate_inspector_protocol_version'
70       ],
71       'actions': [
72         {
73           'action_name': 'generateInspectorProtocolBackendSources',
74           'inputs': [
75             # The python script in action below.
76             'inspector/CodeGeneratorInspector.py',
77             # The helper script imported by CodeGeneratorInspector.py.
78             'inspector/CodeGeneratorInspectorStrings.py',
79             # Input file for the script.
80             '../devtools/protocol.json',
81           ],
82           'outputs': [
83             '<(blink_core_output_dir)/InspectorBackendDispatcher.cpp',
84             '<(blink_core_output_dir)/InspectorBackendDispatcher.h',
85             '<(blink_core_output_dir)/InspectorFrontend.cpp',
86             '<(blink_core_output_dir)/InspectorFrontend.h',
87             '<(blink_core_output_dir)/InspectorTypeBuilder.cpp',
88             '<(blink_core_output_dir)/InspectorTypeBuilder.h',
89           ],
90           'variables': {
91             'generator_include_dirs': [
92             ],
93           },
94           'action': [
95             'python',
96             'inspector/CodeGeneratorInspector.py',
97             '../devtools/protocol.json',
98             '--output_dir', '<(blink_core_output_dir)',
99           ],
100           'message': 'Generating Inspector protocol backend sources from protocol.json',
101         },
102       ]
103     },
104     {
105       # GN version: //third_party/WebKit/Source/core/inspector:instrumentation_sources
106       'target_name': 'inspector_instrumentation_sources',
107       'type': 'none',
108       'dependencies': [],
109       'actions': [
110         {
111           'action_name': 'generateInspectorInstrumentation',
112           'inputs': [
113             # The python script in action below.
114             'inspector/CodeGeneratorInstrumentation.py',
115             # Input file for the script.
116             'inspector/InspectorInstrumentation.idl',
117           ],
118           'outputs': [
119             '<(blink_core_output_dir)/InspectorCanvasInstrumentationInl.h',
120             '<(blink_core_output_dir)/InspectorConsoleInstrumentationInl.h',
121             '<(blink_core_output_dir)/InspectorInstrumentationInl.h',
122             '<(blink_core_output_dir)/InspectorOverridesInl.h',
123             '<(blink_core_output_dir)/InstrumentingAgentsInl.h',
124             '<(blink_core_output_dir)/InspectorInstrumentationImpl.cpp',
125           ],
126           'action': [
127             'python',
128             'inspector/CodeGeneratorInstrumentation.py',
129             'inspector/InspectorInstrumentation.idl',
130             '--output_dir', '<(blink_core_output_dir)',
131           ],
132           'message': 'Generating Inspector instrumentation code from InspectorInstrumentation.idl',
133         }
134       ]
135     },
136     {
137       # GN version: //third_party/WebKit/Source/core/inspector:protocol_version
138       'target_name': 'generate_inspector_protocol_version',
139       'type': 'none',
140       'actions': [
141          {
142           'action_name': 'generateInspectorProtocolVersion',
143           'inputs': [
144             'inspector/generate-inspector-protocol-version',
145             '../devtools/protocol.json',
146           ],
147           'outputs': [
148             '<(blink_core_output_dir)/InspectorProtocolVersion.h',
149           ],
150           'variables': {
151             'generator_include_dirs': [
152             ],
153           },
154           'action': [
155             'python',
156             'inspector/generate-inspector-protocol-version',
157             '-o',
158             '<@(_outputs)',
159             '<@(_inputs)'
160           ],
161           'message': 'Validate inspector protocol for backwards compatibility and generate version file',
162         }
163       ]
164     },
165     {
166       # GN version: //third_party/WebKit/Source/core:core_generated
167       'target_name': 'webcore_generated',
168       'type': 'static_library',
169       'hard_dependency': 1,
170       'dependencies': [
171         'webcore_prerequisites',
172         'core_generated.gyp:make_core_generated',
173         'inspector_protocol_sources',
174         'inspector_instrumentation_sources',
175         '../bindings/core/v8/generated.gyp:bindings_core_v8_generated',
176         # FIXME: don't depend on bindings_modules http://crbug.com/358074
177         '../bindings/modules/generated.gyp:modules_event_generated',
178         '../bindings/modules/v8/generated.gyp:bindings_modules_v8_generated',
179         '../platform/platform_generated.gyp:make_platform_generated',
180         '../wtf/wtf.gyp:wtf',
181         '<(DEPTH)/gin/gin.gyp:gin',
182         '<(DEPTH)/skia/skia.gyp:skia',
183         '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
184         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
185         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
186         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
187         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
188         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
189         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
190         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
191         '<(DEPTH)/url/url.gyp:url_lib',
192         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
193       ],
194       'include_dirs': [
195         '<@(webcore_include_dirs)',
196       ],
197       'sources': [
198         # FIXME: should be bindings_core_v8_files http://crbug.com/358074
199         '<@(bindings_core_v8_files)',
200         # These files include all the .cpp files generated from the .idl files
201         # in webcore_files.
202         '<@(bindings_core_v8_generated_aggregate_files)',
203         '<@(bindings_core_v8_generated_union_type_files)',
204
205         # Additional .cpp files for HashTools.h
206         '<(blink_core_output_dir)/CSSPropertyNames.cpp',
207         '<(blink_core_output_dir)/CSSValueKeywords.cpp',
208
209         # Additional .cpp files from make_core_generated actions.
210         '<(blink_core_output_dir)/Event.cpp',
211         '<(blink_core_output_dir)/EventHeaders.h',
212         '<(blink_core_output_dir)/EventNames.cpp',
213         '<(blink_core_output_dir)/EventNames.h',
214         '<(blink_core_output_dir)/EventTargetNames.cpp',
215         '<(blink_core_output_dir)/EventTargetNames.h',
216         '<(blink_core_output_dir)/EventTypeNames.cpp',
217         '<(blink_core_output_dir)/EventTypeNames.h',
218         '<(blink_core_output_dir)/FetchInitiatorTypeNames.cpp',
219         '<(blink_core_output_dir)/HTMLElementFactory.cpp',
220         '<(blink_core_output_dir)/HTMLElementFactory.h',
221         '<(blink_core_output_dir)/HTMLElementLookupTrie.cpp',
222         '<(blink_core_output_dir)/HTMLElementLookupTrie.h',
223         '<(blink_core_output_dir)/HTMLNames.cpp',
224         '<(blink_core_output_dir)/HTMLTokenizerNames.cpp',
225         '<(blink_core_output_dir)/InputTypeNames.cpp',
226         '<(blink_core_output_dir)/MathMLNames.cpp',
227         '<(blink_core_output_dir)/SVGNames.cpp',
228         '<(blink_core_output_dir)/UserAgentStyleSheetsData.cpp',
229         '<(blink_core_output_dir)/XLinkNames.cpp',
230         '<(blink_core_output_dir)/XMLNSNames.cpp',
231         '<(blink_core_output_dir)/XMLNames.cpp',
232
233         # Generated from HTMLEntityNames.in
234         '<(blink_core_output_dir)/HTMLEntityTable.cpp',
235
236         # Generated from MediaFeatureNames.in
237         '<(blink_core_output_dir)/MediaFeatureNames.cpp',
238
239         # Generated from MediaTypeNames.in
240         '<(blink_core_output_dir)/MediaTypeNames.cpp',
241
242         # Generated from BisonCSSTokenizer-in.cpp
243         '<(blink_core_output_dir)/BisonCSSTokenizer.cpp',
244
245         # Generated from BisonCSSParser-in.cpp
246         '<(blink_core_output_dir)/BisonCSSParser.cpp',
247
248         # Generated from HTMLMetaElement-in.cpp
249         '<(blink_core_output_dir)/HTMLMetaElement.cpp',
250
251         # Additional .cpp files from the make_core_generated rules.
252         '<(blink_core_output_dir)/CSSGrammar.cpp',
253         '<(blink_core_output_dir)/XPathGrammar.cpp',
254
255         # Additional .cpp files from the inspector_protocol_sources list.
256         '<(blink_core_output_dir)/InspectorFrontend.cpp',
257         '<(blink_core_output_dir)/InspectorBackendDispatcher.cpp',
258         '<(blink_core_output_dir)/InspectorTypeBuilder.cpp',
259
260         # Additional .cpp files from the inspector_instrumentation_sources list.
261         '<(blink_core_output_dir)/InspectorCanvasInstrumentationInl.h',
262         '<(blink_core_output_dir)/InspectorConsoleInstrumentationInl.h',
263         '<(blink_core_output_dir)/InspectorInstrumentationInl.h',
264         '<(blink_core_output_dir)/InspectorOverridesInl.h',
265         '<(blink_core_output_dir)/InstrumentingAgentsInl.h',
266         '<(blink_core_output_dir)/InspectorInstrumentationImpl.cpp',
267
268         # Additional .cpp files for SVG.
269         '<(blink_core_output_dir)/SVGElementFactory.cpp',
270
271         # Generated from make_style_shorthands.py
272         '<(blink_core_output_dir)/StylePropertyShorthand.cpp',
273
274         # Generated from make_style_builder.py
275         '<(blink_core_output_dir)/StyleBuilder.cpp',
276         '<(blink_core_output_dir)/StyleBuilderFunctions.cpp',
277
278         # Generated from make_css_property_metadata.py
279         '<(blink_core_output_dir)/CSSPropertyMetadata.cpp',
280
281         # IDL dictionary impl files generated by IDL compiler
282         '<@(generated_core_dictionary_files)',
283       ],
284       'conditions': [
285         ['OS=="win" and component=="shared_library"', {
286           'defines': [
287             'USING_V8_SHARED',
288           ],
289         }],
290         ['OS=="win"', {
291           # In generated bindings code: 'switch contains default but no case'.
292           # Disable c4267 warnings until we fix size_t to int truncations.
293           # 4701 and 4702 are disabled because of issues in Bison-generated
294           # XPathGrammar.cpp and CSSGrammar.cpp.
295           'msvs_disabled_warnings': [ 4065, 4267, 4701, 4702 ],
296         }],
297         ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
298           'cflags': [
299             '<!@(pkg-config --cflags-only-I ipp)',
300           ],
301         }],
302       ],
303     },
304     {
305       # We'll soon split libwebcore in multiple smaller libraries.
306       # webcore_prerequisites will be the 'base' target of every sub-target.
307       # GN version: //third_party/WebKit/Source/core:prerequisites
308       'target_name': 'webcore_prerequisites',
309       'type': 'none',
310       'dependencies': [
311         'inspector_protocol_sources',
312         'inspector_instrumentation_sources',
313         'core_generated.gyp:make_core_generated',
314         '../bindings/core/v8/generated.gyp:bindings_core_v8_generated',
315         # FIXME: don't depend on bindings_modules http://crbug.com/358074
316         '../bindings/modules/v8/generated.gyp:bindings_modules_v8_generated',
317         '../wtf/wtf.gyp:wtf',
318         '../config.gyp:config',
319         '../platform/blink_platform.gyp:blink_platform',
320         '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
321         '<(DEPTH)/skia/skia.gyp:skia',
322         '<(angle_path)/src/angle.gyp:translator',
323         '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
324         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
325         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
326         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
327         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
328         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
329         '<(DEPTH)/third_party/ots/ots.gyp:ots',
330         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
331         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
332         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
333         '<(DEPTH)/url/url.gyp:url_lib',
334         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
335       ],
336       'export_dependent_settings': [
337         '../wtf/wtf.gyp:wtf',
338         '../config.gyp:config',
339         '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
340         '<(DEPTH)/skia/skia.gyp:skia',
341         '<(angle_path)/src/angle.gyp:translator',
342         '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
343         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
344         '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
345         '<(DEPTH)/third_party/libxml/libxml.gyp:libxml',
346         '<(DEPTH)/third_party/libxslt/libxslt.gyp:libxslt',
347         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
348         '<(DEPTH)/third_party/ots/ots.gyp:ots',
349         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
350         '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite',
351         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
352         '<(DEPTH)/url/url.gyp:url_lib',
353         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
354       ],
355       'direct_dependent_settings': {
356         'defines': [
357           'BLINK_IMPLEMENTATION=1',
358           'INSIDE_BLINK',
359         ],
360         'include_dirs': [
361           '<@(webcore_include_dirs)',
362           '<(DEPTH)/gpu',
363           '<(angle_path)/include',
364         ],
365         'xcode_settings': {
366           # Some Mac-specific parts of WebKit won't compile without having this
367           # prefix header injected.
368           'GCC_PREFIX_HEADER': '<(DEPTH)/third_party/WebKit/Source/build/mac/Prefix.h',
369         },
370       },
371       'conditions': [
372         ['OS=="win" and component=="shared_library"', {
373           'direct_dependent_settings': {
374             'defines': [
375                'USING_V8_SHARED',
376             ],
377           },
378         }],
379         ['use_x11 == 1', {
380           'dependencies': [
381             '<(DEPTH)/build/linux/system.gyp:fontconfig',
382           ],
383           'export_dependent_settings': [
384             '<(DEPTH)/build/linux/system.gyp:fontconfig',
385           ],
386           'direct_dependent_settings': {
387             'cflags': [
388               # WebCore does not work with strict aliasing enabled.
389               # https://bugs.webkit.org/show_bug.cgi?id=25864
390               '-fno-strict-aliasing',
391             ],
392           },
393         }],
394         ['OS=="android"', {
395           'sources/': [
396             ['exclude', 'accessibility/'],
397           ],
398         }],
399         ['OS in ("linux", "android") and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
400           'direct_dependent_settings': {
401             'cflags': [
402               '<!@(pkg-config --cflags-only-I ipp)',
403             ],
404           },
405         }],
406         ['OS=="mac"', {
407           'direct_dependent_settings': {
408             'defines': [
409               # Chromium's version of WebCore includes the following Objective-C
410               # classes. The system-provided WebCore framework may also provide
411               # these classes. Because of the nature of Objective-C binding
412               # (dynamically at runtime), it's possible for the
413               # Chromium-provided versions to interfere with the system-provided
414               # versions.  This may happen when a system framework attempts to
415               # use core.framework, such as when converting an HTML-flavored
416               # string to an NSAttributedString.  The solution is to force
417               # Objective-C class names that would conflict to use alternate
418               # names.
419               #
420               # This list will hopefully shrink but may also grow.  Its
421               # performance is monitored by the "Check Objective-C Rename"
422               # postbuild step, and any suspicious-looking symbols not handled
423               # here or whitelisted in that step will cause a build failure.
424               #
425               # If this is unhandled, the console will receive log messages
426               # such as:
427               # com.google.Chrome[] objc[]: Class ScrollbarPrefsObserver is implemented in both .../Google Chrome.app/Contents/Versions/.../Google Chrome Helper.app/Contents/MacOS/../../../Google Chrome Framework.framework/Google Chrome Framework and /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore. One of the two will be used. Which one is undefined.
428               'WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell',
429               'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
430             ],
431             'postbuilds': [
432               {
433                 # This step ensures that any Objective-C names that aren't
434                 # redefined to be "safe" above will cause a build failure.
435                 'postbuild_name': 'Check Objective-C Rename',
436                 'variables': {
437                   'class_whitelist_regex':
438                       'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView|ScrollerStyleObserver',
439                   'category_whitelist_regex':
440                       'WebCoreFocusRingDrawing|WebCoreTheme',
441                 },
442                 'action': [
443                   '../build/scripts/check_objc_rename.sh',
444                   '<(class_whitelist_regex)',
445                   '<(category_whitelist_regex)',
446                 ],
447               },
448             ],
449           },
450         }],
451         ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
452           # This directory needs to be on the include path for multiple sub-targets of webcore.
453           'direct_dependent_settings': {
454             'include_dirs': [
455               '<(DEPTH)/third_party/ffmpeg',
456             ],
457           },
458           'dependencies': [
459             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
460           ],
461         }],
462        ['"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" in feature_defines', {
463          'direct_dependent_settings': {
464            'include_dirs': [
465              '<(DEPTH)/third_party/openmax_dl',
466            ],
467          },
468          'dependencies': [
469            '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl',
470          ],
471        }],
472         # Windows shared builder needs extra help for linkage
473         ['OS=="win" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
474           'export_dependent_settings': [
475             '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
476           ],
477         }],
478       ],
479     },
480     {
481       # GN version: //third_party/WebKit/Source/core:dom
482       'target_name': 'webcore_dom',
483       'type': 'static_library',
484       'dependencies': [
485         'webcore_prerequisites',
486       ],
487       'sources': [
488         '<@(webcore_dom_files)',
489       ],
490       # Disable c4267 warnings until we fix size_t to int truncations.
491       'msvs_disabled_warnings': [ 4267, ],
492     },
493     {
494       # GN version: //third_party/WebKit/Source/core:html
495       'target_name': 'webcore_html',
496       'type': 'static_library',
497       'dependencies': [
498         'webcore_prerequisites',
499       ],
500       'sources': [
501         '<@(webcore_html_files)',
502       ],
503       'conditions': [
504         # Shard this taret into parts to work around linker limitations.
505         # on link time code generation builds.
506         ['OS=="win" and buildtype=="Official"', {
507           'msvs_shard': 5,
508         }],
509         ['OS!="android"', {
510           'sources/': [
511             ['exclude', 'Android\\.cpp$'],
512           ],
513         }],
514       ],
515     },
516     {
517       # GN version: //third_party/WebKit/Source/core:svg
518       'target_name': 'webcore_svg',
519       'type': 'static_library',
520       'dependencies': [
521         'webcore_prerequisites',
522       ],
523       'sources': [
524         '<@(webcore_svg_files)',
525       ],
526       'conditions': [
527         ['OS=="win" and buildtype=="Official"', {
528           'msvs_shard': 5,
529         }],
530       ],
531     },
532     {
533       # GN version: //third_party/WebKit/Source/core:rendering
534       'target_name': 'webcore_rendering',
535       'type': 'static_library',
536       'dependencies': [
537         'webcore_prerequisites',
538       ],
539       'sources': [
540         '<@(webcore_files)',
541       ],
542       'sources/': [
543         ['exclude', '.*'],
544         ['include', 'rendering/'],
545
546         ['exclude', '(?<!Chromium)(CF|CG|Mac|Win)\\.(cpp|mm?)$'],
547         # Previous rule excludes things like ChromiumFooWin, include those.
548         ['include', 'rendering/.*Chromium.*\\.(cpp|mm?)$'],
549       ],
550       'conditions': [
551         # Shard this taret into parts to work around linker limitations.
552         # on link time code generation builds.
553         ['OS=="win" and buildtype=="Official"', {
554           'msvs_shard': 5,
555         }],
556         ['use_default_render_theme==0', {
557           'sources/': [
558             ['exclude', 'rendering/RenderThemeChromiumDefault.*'],
559           ],
560         }],
561         ['OS=="win"', {
562           'sources/': [
563             ['exclude', 'Posix\\.cpp$'],
564           ],
565         },{ # OS!="win"
566           'sources/': [
567             ['exclude', 'Win\\.cpp$'],
568           ],
569         }],
570         ['OS=="win" and chromium_win_pch==1', {
571           'sources/': [
572             ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
573           ],
574         }],
575         ['OS=="mac"', {
576           'sources/': [
577             # RenderThemeChromiumSkia is not used on mac since RenderThemeChromiumMac
578             # does not reference the Skia code that is used by Windows, Linux and Android.
579             ['exclude', 'rendering/RenderThemeChromiumSkia\\.cpp$'],
580             # RenderThemeChromiumFontProvider is used by RenderThemeChromiumSkia.
581             ['exclude', 'rendering/RenderThemeChromiumFontProvider\\.cpp'],
582             ['exclude', 'rendering/RenderThemeChromiumFontProvider\\.h'],
583           ],
584         },{ # OS!="mac"
585           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
586         }],
587         ['OS == "android" and target_arch == "ia32" and gcc_version == 46', {
588           # Due to a bug in gcc 4.6 in android NDK, we get warnings about uninitialized variable.
589           'cflags': ['-Wno-uninitialized'],
590         }],
591         ['OS != "linux"', {
592           'sources/': [
593             ['exclude', 'Linux\\.cpp$'],
594           ],
595         }],
596         ['OS=="android"', {
597           'sources/': [
598             ['include', 'rendering/RenderThemeChromiumFontProviderLinux\\.cpp$'],
599             ['include', 'rendering/RenderThemeChromiumDefault\\.cpp$'],
600           ],
601         },{ # OS!="android"
602           'sources/': [
603             ['exclude', 'Android\\.cpp$'],
604           ],
605         }],
606       ],
607     },
608     {
609       # GN version: //third_party/WebKit/Source/core:remaining
610       'target_name': 'webcore_remaining',
611       'type': 'static_library',
612       'dependencies': [
613         'webcore_prerequisites',
614       ],
615       'sources': [
616         '<@(webcore_files)',
617       ],
618       'sources/': [
619         ['exclude', 'rendering/'],
620
621         ['exclude', '(?<!Chromium)(CF|CG|Mac|Win)\\.(cpp|mm?)$'],
622       ],
623       'conditions': [
624         # Shard this target into parts to work around linker limitations.
625         # on link time code generation builds.
626         ['OS=="win" and (buildtype=="Official" or (fastbuild==0 and win_z7==1))', {
627           'msvs_shard': 19,
628         }],
629         ['OS != "linux"', {
630           'sources/': [
631             ['exclude', 'Linux\\.cpp$'],
632           ],
633         }],
634         ['OS=="android"', {
635           'cflags': [
636             # WebCore does not work with strict aliasing enabled.
637             # https://bugs.webkit.org/show_bug.cgi?id=25864
638             '-fno-strict-aliasing',
639           ],
640         }, { # OS!="android"
641           'sources/': [['exclude', 'Android\\.cpp$']]
642         }],
643         ['OS=="mac"', {
644           'sources': [
645             'editing/SmartReplaceCF.cpp',
646           ],
647           'link_settings': {
648             'libraries': [
649               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
650             ],
651           },
652           'sources/': [
653             # Additional files from the WebCore Mac build that are presently
654             # used in the WebCore Chromium Mac build too.
655
656             # The Mac build is USE(CF).
657             ['include', 'CF\\.cpp$'],
658
659             # Cherry-pick some files that can't be included by broader regexps.
660             # Some of these are used instead of Chromium platform files, see
661             # the specific exclusions in the "exclude" list below.
662             ['include', 'platform/mac/WebCoreSystemInterface\\.h$'],
663             ['include', 'platform/mac/WebCoreTextRenderer\\.mm$'],
664             ['include', 'platform/text/mac/ShapeArabic\\.c$'],
665             ['include', 'platform/text/mac/String(Impl)?Mac\\.mm$'],
666             # Use USE_NEW_THEME on Mac.
667             ['include', 'platform/Theme\\.cpp$'],
668           ],
669         }, { # OS!="mac"
670           'sources/': [['exclude', 'Mac\\.(cpp|mm?)$']]
671         }],
672         ['OS=="win" and chromium_win_pch==1', {
673           'sources/': [
674             ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
675           ],
676         }],
677       ],
678       # Disable c4267 warnings until we fix size_t to int truncations.
679       'msvs_disabled_warnings': [ 4267, 4334, ],
680     },
681     {
682       # GN version: //third_party/WebKit/Source/core:core
683       'target_name': 'webcore',
684       'type': 'none',
685       'dependencies': [
686         'webcore_dom',
687         'webcore_html',
688         'webcore_remaining',
689         'webcore_rendering',
690         'webcore_svg',
691         # Exported.
692         'webcore_generated',
693         '../platform/blink_platform.gyp:blink_platform',
694         '../wtf/wtf.gyp:wtf',
695         '<(DEPTH)/skia/skia.gyp:skia',
696         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
697         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
698         '<(DEPTH)/url/url.gyp:url_lib',
699         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
700       ],
701       'export_dependent_settings': [
702         'webcore_generated',
703         '../platform/blink_platform.gyp:blink_platform',
704         '../wtf/wtf.gyp:wtf',
705         '<(DEPTH)/skia/skia.gyp:skia',
706         '<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
707         '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
708         '<(DEPTH)/url/url.gyp:url_lib',
709         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
710       ],
711       'direct_dependent_settings': {
712         'include_dirs': [
713           '<@(webcore_include_dirs)',
714         ],
715       },
716       'conditions': [
717         ['OS=="linux" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
718           'link_settings': {
719             'ldflags': [
720               '<!@(pkg-config --libs-only-L ipp)',
721             ],
722             'libraries': [
723               '-lipps -lippcore',
724             ],
725           },
726         }],
727         # Use IPP static libraries for x86 Android.
728         ['OS=="android" and "WTF_USE_WEBAUDIO_IPP=1" in feature_defines', {
729           'link_settings': {
730             'libraries': [
731                '<!@(pkg-config --libs ipp|sed s/-L//)/libipps_l.a',
732                '<!@(pkg-config --libs ipp|sed s/-L//)/libippcore_l.a',
733             ]
734           },
735         }],
736       ],
737     },
738     {
739       # GN version: //third_party/WebKit/Source/core:testing
740       'target_name': 'webcore_testing',
741       'type': 'static_library',
742       'dependencies': [
743         '../config.gyp:config',
744         'webcore',
745         'webcore_generated',
746       ],
747       'defines': [
748         'BLINK_IMPLEMENTATION=1',
749         'INSIDE_BLINK',
750       ],
751       'include_dirs': [
752         '<(bindings_core_v8_dir)',  # FIXME: Remove once http://crbug.com/236119 is fixed.
753         'testing',
754         'testing/v8',
755       ],
756       'sources': [
757         # Note: file list duplicated in GN build.
758         '<@(generated_core_testing_dictionary_files)',
759         '<@(webcore_testing_files)',
760         '<(bindings_core_v8_output_dir)/V8DictionaryTest.cpp',
761         '<(bindings_core_v8_output_dir)/V8DictionaryTest.h',
762         '<(bindings_core_v8_output_dir)/V8GarbageCollectedScriptWrappable.cpp',
763         '<(bindings_core_v8_output_dir)/V8GarbageCollectedScriptWrappable.h',
764         '<(bindings_core_v8_output_dir)/V8GCObservation.cpp',
765         '<(bindings_core_v8_output_dir)/V8GCObservation.h',
766         '<(bindings_core_v8_output_dir)/V8PrivateScriptTest.cpp',
767         '<(bindings_core_v8_output_dir)/V8PrivateScriptTest.h',
768         '<(bindings_core_v8_output_dir)/V8TypeConversions.cpp',
769         '<(bindings_core_v8_output_dir)/V8TypeConversions.h',
770         '<(bindings_core_v8_output_dir)/V8UnionTypesTest.cpp',
771         '<(bindings_core_v8_output_dir)/V8UnionTypesTest.h',
772         '<(bindings_core_v8_output_dir)/V8Internals.cpp',
773         '<(bindings_core_v8_output_dir)/V8Internals.h',
774         '<(bindings_core_v8_output_dir)/V8InternalProfilers.cpp',
775         '<(bindings_core_v8_output_dir)/V8InternalProfilers.h',
776         '<(bindings_core_v8_output_dir)/V8InternalSettings.cpp',
777         '<(bindings_core_v8_output_dir)/V8InternalSettings.h',
778         '<(bindings_core_v8_output_dir)/V8InternalSettingsGenerated.cpp',
779         '<(bindings_core_v8_output_dir)/V8InternalSettingsGenerated.h',
780         '<(bindings_core_v8_output_dir)/V8InternalRuntimeFlags.cpp',
781         '<(bindings_core_v8_output_dir)/V8InternalRuntimeFlags.h',
782         '<(bindings_core_v8_output_dir)/V8LayerRect.cpp',
783         '<(bindings_core_v8_output_dir)/V8LayerRect.h',
784         '<(bindings_core_v8_output_dir)/V8LayerRectList.cpp',
785         '<(bindings_core_v8_output_dir)/V8LayerRectList.h',
786         '<(bindings_core_v8_output_dir)/V8RefCountedScriptWrappable.cpp',
787         '<(bindings_core_v8_output_dir)/V8RefCountedScriptWrappable.h',
788         '<(bindings_core_v8_output_dir)/V8InternalDictionary.cpp',
789         '<(bindings_core_v8_output_dir)/V8InternalDictionary.h',
790       ],
791       'sources/': [
792         ['exclude', 'testing/js'],
793       ],
794     },
795   ],  # targets
796 }