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|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/opentype/OpenTypeTypes\\.h$'],
255 ['include', 'fonts/opentype/OpenTypeVerticalData\\.(cpp|h)$'],
258 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
262 ['OS=="linux" or OS=="android"', {
264 ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
266 }, { # OS!="linux" and OS!="android"
268 ['exclude', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
273 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
277 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
278 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
279 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
283 # We use LocaleMac.mm instead of LocaleICU.cpp
284 ['exclude', 'text/LocaleICU\\.(cpp|h)$'],
285 ['include', 'text/LocaleMac\\.mm$'],
287 # The Mac uses mac/KillRingMac.mm instead of the dummy
289 ['exclude', 'KillRingNone\\.cpp$'],
291 # The Mac build is USE(CF).
292 ['include', 'CF\\.cpp$'],
294 # Use native Mac font code from core.
295 ['include', '(fonts/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
297 # TODO(dro): Merge the opentype vertical data files inclusion across all platforms.
298 ['include', 'fonts/opentype/OpenTypeTypes\\.h$'],
299 ['include', 'fonts/opentype/OpenTypeVerticalData\\.(cpp|h)$'],
301 # Cherry-pick some files that can't be included by broader regexps.
302 # Some of these are used instead of Chromium platform files, see
303 # the specific exclusions in the "exclude" list below.
304 ['include', 'audio/mac/FFTFrameMac\\.cpp$'],
305 ['include', 'fonts/mac/GlyphPageTreeNodeMac\\.cpp$'],
306 ['include', 'mac/ColorMac\\.mm$'],
307 ['include', 'mac/BlockExceptions\\.mm$'],
308 ['include', 'mac/KillRingMac\\.mm$'],
309 ['include', 'mac/LocalCurrentGraphicsContext\\.mm$'],
310 ['include', 'mac/NSScrollerImpDetails\\.mm$'],
311 ['include', 'mac/ScrollAnimatorMac\\.mm$'],
312 ['include', 'mac/ScrollElasticityController\\.mm$'],
313 ['include', 'mac/ThemeMac\\.h$'],
314 ['include', 'mac/ThemeMac\\.mm$'],
315 ['include', 'mac/WebCoreNSCellExtras\\.h$'],
316 ['include', 'mac/WebCoreNSCellExtras\\.mm$'],
318 # Mac uses only ScrollAnimatorMac.
319 ['exclude', 'scroll/ScrollbarThemeNonMacCommon\\.(cpp|h)$'],
320 ['exclude', 'scroll/ScrollAnimatorNone\\.cpp$'],
321 ['exclude', 'scroll/ScrollAnimatorNone\\.h$'],
323 # The Mac currently uses FontCustomPlatformDataMac.cpp,
324 # included by regex above, instead.
325 ['exclude', 'fonts/skia/FontCustomPlatformDataSkia\\.cpp$'],
327 ['exclude', 'fonts/skia/FontCacheSkia\\.cpp$'],
329 ['include', 'geometry/mac/FloatPointMac\\.mm$'],
330 ['include', 'geometry/mac/FloatRectMac\\.mm$'],
331 ['include', 'geometry/mac/FloatSizeMac\\.mm$'],
332 ['include', 'geometry/mac/IntPointMac\\.mm$'],
333 ['include', 'geometry/mac/IntRectMac\\.mm$'],
335 ['include', 'geometry/cg/FloatPointCG\\.cpp$'],
336 ['include', 'geometry/cg/FloatRectCG\\.cpp$'],
337 ['include', 'geometry/cg/FloatSizeCG\\.cpp$'],
338 ['include', 'geometry/cg/IntPointCG\\.cpp$'],
339 ['include', 'geometry/cg/IntRectCG\\.cpp$'],
340 ['include', 'geometry/cg/IntSizeCG\\.cpp$'],
343 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
348 ['exclude', 'geometry/mac/'],
349 ['exclude', 'geometry/cg/'],
350 ['exclude', 'scroll/ScrollbarThemeMac'],
353 ['OS != "linux" and OS != "mac" and OS != "win"', {
355 ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
360 # We use LocaleWin.cpp instead of LocaleICU.cpp
361 ['exclude', 'text/LocaleICU\\.(cpp|h)$'],
362 ['include', 'text/LocaleWin\\.(cpp|h)$'],
364 ['include', 'clipboard/ClipboardUtilitiesWin\\.(cpp|h)$'],
366 ['include', 'fonts/opentype/'],
367 ['include', 'fonts/skia/FontCustomPlatformDataSkia\\.cpp$'],
368 ['include', 'fonts/skia/FontCustomPlatformDataSkia\\.cpp$'],
369 ['include', 'fonts/win/FontCacheSkiaWin\\.cpp$'],
370 ['include', 'fonts/win/FontFallbackWin\\.(cpp|h)$'],
371 ['include', 'fonts/win/FontPlatformDataWin\\.cpp$'],
373 # SystemInfo.cpp is useful and we don't want to copy it.
374 ['include', 'win/SystemInfo\\.cpp$'],
379 ['exclude', 'Win\\.cpp$'],
380 ['exclude', '/(Windows)[^/]*\\.cpp$'],
381 ['include', 'fonts/opentype/OpenTypeSanitizer\\.cpp$'],
384 ['OS=="win" and chromium_win_pch==1', {
386 ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
391 ['include', '^fonts/VDMXParser\\.cpp$'],
395 ['exclude', 'Android\\.cpp$'],
400 '<(DEPTH)/build/linux/system.gyp:fontconfig',
402 'export_dependent_settings': [
403 '<(DEPTH)/build/linux/system.gyp:fontconfig',
406 ['use_default_render_theme==0', {
408 ['exclude', 'scroll/ScrollbarThemeAura\\.(cpp|h)'],
411 ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
413 '<(DEPTH)/third_party/ffmpeg',
416 '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
419 ['"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" in feature_defines', {
421 '<(DEPTH)/third_party/openmax_dl',
424 '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl',
427 ['target_arch=="arm"', {
433 'target_conditions': [
436 ['include', 'exported/linux/WebFontRenderStyle\\.cpp$'],
437 ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
442 # The *NEON.cpp files fail to compile when -mthumb is passed. Force
443 # them to build in ARM mode.
444 # See https://bugs.webkit.org/show_bug.cgi?id=62916.
446 'target_name': 'blink_arm_neon',
448 ['target_arch=="arm"', {
449 'type': 'static_library',
453 'hard_dependency': 1,
455 '<@(platform_files)',
459 ['include', 'graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
464 'cflags!': ['-mthumb'],
467 },{ # target_arch!="arm"