2 # Copyright (C) 2013 Google Inc. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
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
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.
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.
32 '../build/features.gypi',
33 '../build/scripts/scripts.gypi',
34 '../build/win/precompile.gypi',
35 'blink_platform.gypi',
36 'heap/blink_heap.gypi',
39 'target_name': 'blink_common',
40 'type': '<(component)',
41 'variables': { 'enable_wexit_time_destructors': 1 },
43 '../config.gyp:config',
45 # FIXME: Can we remove the dependency on Skia?
46 '<(DEPTH)/skia/skia.gyp:skia',
48 'all_dependent_settings': {
53 'export_dependent_settings': [
54 '<(DEPTH)/skia/skia.gyp:skia',
57 'BLINK_COMMON_IMPLEMENTATION=1',
61 '<(SHARED_INTERMEDIATE_DIR)/blink',
64 'exported/WebCString.cpp',
65 'exported/WebString.cpp',
66 'exported/WebCommon.cpp',
70 'target_name': 'blink_heap_asm_stubs',
71 'type': 'static_library',
72 # VS2010 does not correctly incrementally link obj files generated
73 # from asm files. This flag disables UseLibraryDependencyInputs to
75 'msvs_2010_disable_uldi_when_referenced': 1,
77 '../../../yasm/yasm_compile.gypi',
80 '<@(platform_heap_asm_files)',
83 'more_yasm_flags': [],
87 # Necessary to ensure symbols end up with a _ prefix; added by
88 # yasm_compile.gypi for Windows, but not Mac.
92 ['OS == "win" and target_arch == "x64"', {
97 ['OS != "win" and target_arch == "x64"', {
102 ['target_arch == "ia32"', {
107 ['target_arch == "arm"', {
114 '>@(more_yasm_flags)',
116 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/webcore/heap'
120 'target_name': 'blink_prerequisites',
124 'direct_dependent_settings': {
126 # Chromium's version of WebCore includes the following Objective-C
127 # classes. The system-provided WebCore framework may also provide
128 # these classes. Because of the nature of Objective-C binding
129 # (dynamically at runtime), it's possible for the
130 # Chromium-provided versions to interfere with the system-provided
131 # versions. This may happen when a system framework attempts to
132 # use core.framework, such as when converting an HTML-flavored
133 # string to an NSAttributedString. The solution is to force
134 # Objective-C class names that would conflict to use alternate
137 # This list will hopefully shrink but may also grow. Its
138 # performance is monitored by the "Check Objective-C Rename"
139 # postbuild step, and any suspicious-looking symbols not handled
140 # here or whitelisted in that step will cause a build failure.
142 # If this is unhandled, the console will receive log messages
144 # 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.
145 'WebCascadeList=ChromiumWebCoreObjCWebCascadeList',
146 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
147 'WebScrollAnimationHelperDelegate=ChromiumWebCoreObjCWebScrollAnimationHelperDelegate',
148 'WebScrollbarPainterControllerDelegate=ChromiumWebCoreObjCWebScrollbarPainterControllerDelegate',
149 'WebScrollbarPainterDelegate=ChromiumWebCoreObjCWebScrollbarPainterDelegate',
150 'WebScrollbarPartAnimation=ChromiumWebCoreObjCWebScrollbarPartAnimation',
151 'WebCoreFlippedView=ChromiumWebCoreObjCWebCoreFlippedView',
152 'WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell',
153 'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
157 # This step ensures that any Objective-C names that aren't
158 # redefined to be "safe" above will cause a build failure.
159 'postbuild_name': 'Check Objective-C Rename',
161 'class_whitelist_regex':
162 'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView|ScrollerStyleObserver',
163 'category_whitelist_regex':
164 'WebCoreFocusRingDrawing|WebCoreTheme',
167 '../build/scripts/check_objc_rename.sh',
168 '<(class_whitelist_regex)',
169 '<(category_whitelist_regex)',
178 'target_name': 'blink_platform',
179 'type': '<(component)',
181 '../config.gyp:config',
182 '../wtf/wtf.gyp:wtf',
184 'blink_heap_asm_stubs',
185 'blink_prerequisites',
186 '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
187 '<(DEPTH)/skia/skia.gyp:skia',
188 '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
189 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
190 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
191 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
192 '<(DEPTH)/third_party/ots/ots.gyp:ots',
193 '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
194 '<(DEPTH)/url/url.gyp:url_lib',
195 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
196 'platform_generated.gyp:make_platform_generated',
197 '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
198 '<(libjpeg_gyp_path):libjpeg',
200 'export_dependent_settings': [
201 '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
202 '<(DEPTH)/skia/skia.gyp:skia',
203 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
204 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
205 '<(DEPTH)/third_party/ots/ots.gyp:ots',
206 '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
207 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
208 '<(DEPTH)/url/url.gyp:url_lib',
209 '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
210 '<(libjpeg_gyp_path):libjpeg',
213 'BLINK_PLATFORM_IMPLEMENTATION=1',
217 '<(angle_path)/include',
218 '<(SHARED_INTERMEDIATE_DIR)/blink',
221 # Some Mac-specific parts of WebKit won't compile without having this
222 # prefix header injected.
223 'GCC_PREFIX_HEADER': '<(DEPTH)/third_party/WebKit/Source/build/mac/Prefix.h',
226 '<@(platform_files)',
227 '<@(platform_heap_files)',
229 # Additional .cpp files from platform_generated.gyp:make_platform_generated actions.
230 '<(blink_platform_output_dir)/FontFamilyNames.cpp',
231 '<(blink_platform_output_dir)/RuntimeEnabledFeatures.cpp',
232 '<(blink_platform_output_dir)/RuntimeEnabledFeatures.h',
233 '<(blink_platform_output_dir)/ColorData.cpp',
236 # Exclude all platform specific things, reinclude them below on a per-platform basis
237 # FIXME: Figure out how to store these patterns in a variable.
238 ['exclude', '(cf|cg|harfbuzz|mac|opentype|win)/'],
239 ['exclude', '(?<!Chromium)(CF|CG|Mac|Win)\\.(cpp|mm?)$'],
241 # *NEON.cpp files need special compile options.
242 # They are moved to the webcore_0_neon target.
243 ['exclude', 'graphics/cpu/arm/.*NEON\\.(cpp|h)'],
244 ['exclude', 'graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
246 # Disable c4267 warnings until we fix size_t to int truncations.
247 # Disable c4724 warnings which is generated in VS2012 due to improper
248 # compiler optimizations, see crbug.com/237063
249 'msvs_disabled_warnings': [ 4267, 4334, 4724 ],
251 ['OS=="linux" or OS=="android" or OS=="win"', {
253 # Cherry-pick files excluded by the broader regular expressions above.
254 ['include', 'fonts/harfbuzz/FontHarfBuzz\\.cpp$'],
255 ['include', 'fonts/harfbuzz/FontPlatformDataHarfBuzz\\.cpp$'],
256 ['include', 'fonts/harfbuzz/HarfBuzzFace\\.(cpp|h)$'],
257 ['include', 'fonts/harfbuzz/HarfBuzzFaceSkia\\.cpp$'],
258 ['include', 'fonts/harfbuzz/HarfBuzzShaper\\.(cpp|h)$'],
259 ['include', 'fonts/opentype/OpenTypeTypes\\.h$'],
260 ['include', 'fonts/opentype/OpenTypeVerticalData\\.(cpp|h)$'],
261 ['include', 'fonts/skia/SimpleFontDataSkia\\.cpp$'],
264 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
266 }, { # OS!="linux" and OS!="android" and OS!="win"
268 ['exclude', 'Harfbuzz[^/]+\\.(cpp|h)$'],
271 ['OS=="linux" or OS=="android"', {
273 ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
275 }, { # OS!="linux" and OS!="android"
277 ['exclude', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
282 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
286 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
287 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
288 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
292 # We use LocaleMac.mm instead of LocaleICU.cpp
293 ['exclude', 'text/LocaleICU\\.(cpp|h)$'],
294 ['include', 'text/LocaleMac\\.mm$'],
296 # The Mac uses mac/KillRingMac.mm instead of the dummy
298 ['exclude', 'KillRingNone\\.cpp$'],
300 # The Mac build is USE(CF).
301 ['include', 'CF\\.cpp$'],
303 # Use native Mac font code from core.
304 ['include', '(fonts/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
305 ['include', 'fonts/mac/ComplexText[^/]*\\.(cpp|h)$'],
307 # Cherry-pick some files that can't be included by broader regexps.
308 # Some of these are used instead of Chromium platform files, see
309 # the specific exclusions in the "exclude" list below.
310 ['include', 'audio/mac/FFTFrameMac\\.cpp$'],
311 ['include', 'fonts/mac/ComplexTextControllerCoreText\\.mm$'],
312 ['include', 'mac/ColorMac\\.mm$'],
313 ['include', 'mac/BlockExceptions\\.mm$'],
314 ['include', 'mac/KillRingMac\\.mm$'],
315 ['include', 'mac/LocalCurrentGraphicsContext\\.mm$'],
316 ['include', 'mac/NSScrollerImpDetails\\.mm$'],
317 ['include', 'mac/ScrollAnimatorMac\\.mm$'],
318 ['include', 'mac/ScrollElasticityController\\.mm$'],
319 ['include', 'mac/ThemeMac\\.h$'],
320 ['include', 'mac/ThemeMac\\.mm$'],
321 ['include', 'mac/WebCoreNSCellExtras\\.h$'],
322 ['include', 'mac/WebCoreNSCellExtras\\.mm$'],
324 # Mac uses only ScrollAnimatorMac.
325 ['exclude', 'scroll/ScrollbarThemeNonMacCommon\\.(cpp|h)$'],
326 ['exclude', 'scroll/ScrollAnimatorNone\\.cpp$'],
327 ['exclude', 'scroll/ScrollAnimatorNone\\.h$'],
329 # The Mac currently uses FontCustomPlatformDataMac.cpp,
330 # included by regex above, instead.
331 ['exclude', 'fonts/skia/FontCustomPlatformDataSkia\\.cpp$'],
333 ['exclude', 'fonts/skia/FontCacheSkia\\.cpp$'],
334 ['exclude', 'fonts/skia/SimpleFontDataSkia\\.cpp$'],
337 ['include', 'fonts/harfbuzz/HarfBuzzFaceCoreText\\.cpp$'],
338 ['include', 'fonts/harfbuzz/HarfBuzzFace\\.(cpp|h)$'],
339 ['include', 'fonts/harfbuzz/HarfBuzzShaper\\.(cpp|h)$'],
341 ['include', 'geometry/mac/FloatPointMac\\.mm$'],
342 ['include', 'geometry/mac/FloatRectMac\\.mm$'],
343 ['include', 'geometry/mac/FloatSizeMac\\.mm$'],
344 ['include', 'geometry/mac/IntPointMac\\.mm$'],
345 ['include', 'geometry/mac/IntRectMac\\.mm$'],
347 ['include', 'geometry/cg/FloatPointCG\\.cpp$'],
348 ['include', 'geometry/cg/FloatRectCG\\.cpp$'],
349 ['include', 'geometry/cg/FloatSizeCG\\.cpp$'],
350 ['include', 'geometry/cg/IntPointCG\\.cpp$'],
351 ['include', 'geometry/cg/IntRectCG\\.cpp$'],
352 ['include', 'geometry/cg/IntSizeCG\\.cpp$'],
355 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
360 ['exclude', 'geometry/mac/'],
361 ['exclude', 'geometry/cg/'],
362 ['exclude', 'scroll/ScrollbarThemeMac'],
364 # FIXME: We will eventually compile this too, but for now it's
366 ['exclude', 'fonts/FontPlatformData\\.cpp$'],
367 ['exclude', 'fonts/harfbuzz/HarfBuzzFaceCoreText\\.cpp$'],
370 ['OS != "linux" and OS != "mac" and OS != "win"', {
372 ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
377 # We use LocaleWin.cpp instead of LocaleICU.cpp
378 ['exclude', 'text/LocaleICU\\.(cpp|h)$'],
379 ['include', 'text/LocaleWin\\.(cpp|h)$'],
381 ['include', 'clipboard/ClipboardUtilitiesWin\\.(cpp|h)$'],
383 ['include', 'fonts/opentype/'],
384 ['include', 'fonts/skia/FontCustomPlatformDataSkia\\.cpp$'],
385 ['include', 'fonts/skia/FontCustomPlatformDataSkia\\.cpp$'],
386 ['include', 'fonts/skia/SimpleFontDataSkia\\.cpp$'],
387 ['include', 'fonts/win/FontCacheSkiaWin\\.cpp$'],
388 ['include', 'fonts/win/FontFallbackWin\\.(cpp|h)$'],
389 ['include', 'fonts/win/FontPlatformDataWin\\.cpp$'],
391 # SystemInfo.cpp is useful and we don't want to copy it.
392 ['include', 'win/SystemInfo\\.cpp$'],
397 ['exclude', 'Win\\.cpp$'],
398 ['exclude', '/(Windows)[^/]*\\.cpp$'],
399 ['include', 'fonts/opentype/OpenTypeSanitizer\\.cpp$'],
402 ['OS=="win" and chromium_win_pch==1', {
404 ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
409 ['include', '^fonts/VDMXParser\\.cpp$'],
413 ['exclude', 'Android\\.cpp$'],
418 '<(DEPTH)/build/linux/system.gyp:fontconfig',
420 'export_dependent_settings': [
421 '<(DEPTH)/build/linux/system.gyp:fontconfig',
424 ['use_default_render_theme==0', {
426 ['exclude', 'scroll/ScrollbarThemeAura\\.(cpp|h)'],
429 ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
431 '<(DEPTH)/third_party/ffmpeg',
434 '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
437 ['"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" in feature_defines', {
439 '<(DEPTH)/third_party/openmax_dl',
442 '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl',
445 ['target_arch=="arm"', {
451 'target_conditions': [
454 ['include', 'exported/linux/WebFontRenderStyle\\.cpp$'],
455 ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
460 # The *NEON.cpp files fail to compile when -mthumb is passed. Force
461 # them to build in ARM mode.
462 # See https://bugs.webkit.org/show_bug.cgi?id=62916.
464 'target_name': 'blink_arm_neon',
466 ['target_arch=="arm"', {
467 'type': 'static_library',
471 'hard_dependency': 1,
473 '<@(platform_files)',
477 ['include', 'graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
482 'cflags!': ['-mthumb'],
485 },{ # target_arch!="arm"