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 'WebScrollAnimationHelperDelegate=ChromiumWebCoreObjCWebScrollAnimationHelperDelegate',
147 'WebScrollbarPainterControllerDelegate=ChromiumWebCoreObjCWebScrollbarPainterControllerDelegate',
148 'WebScrollbarPainterDelegate=ChromiumWebCoreObjCWebScrollbarPainterDelegate',
149 'WebScrollbarPartAnimation=ChromiumWebCoreObjCWebScrollbarPartAnimation',
150 'WebCoreFlippedView=ChromiumWebCoreObjCWebCoreFlippedView',
151 'WebCoreScrollbarObserver=ChromiumWebCoreObjCWebCoreScrollbarObserver',
152 'WebCoreTextFieldCell=ChromiumWebCoreObjCWebCoreTextFieldCell',
156 # This step ensures that any Objective-C names that aren't
157 # redefined to be "safe" above will cause a build failure.
158 'postbuild_name': 'Check Objective-C Rename',
160 'class_whitelist_regex':
161 'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView|ScrollerStyleObserver|LayoutThemeNotificationObserver',
162 'category_whitelist_regex':
163 'WebCoreFocusRingDrawing|WebCoreTheme',
166 '../build/scripts/check_objc_rename.sh',
167 '<(class_whitelist_regex)',
168 '<(category_whitelist_regex)',
177 'target_name': 'blink_platform',
178 'type': '<(component)',
180 '../config.gyp:config',
181 '../wtf/wtf.gyp:wtf',
183 'blink_heap_asm_stubs',
184 'blink_prerequisites',
185 '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
186 '<(DEPTH)/skia/skia.gyp:skia',
187 '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
188 '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
189 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
190 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
191 '<(DEPTH)/third_party/ots/ots.gyp:ots',
192 '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
193 '<(DEPTH)/url/url.gyp:url_lib',
194 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
195 'platform_generated.gyp:make_platform_generated',
196 '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
197 '<(libjpeg_gyp_path):libjpeg',
199 'export_dependent_settings': [
200 '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib',
201 '<(DEPTH)/skia/skia.gyp:skia',
202 '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
203 '<(DEPTH)/third_party/libwebp/libwebp.gyp:libwebp',
204 '<(DEPTH)/third_party/ots/ots.gyp:ots',
205 '<(DEPTH)/third_party/qcms/qcms.gyp:qcms',
206 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
207 '<(DEPTH)/url/url.gyp:url_lib',
208 '<(DEPTH)/third_party/iccjpeg/iccjpeg.gyp:iccjpeg',
209 '<(libjpeg_gyp_path):libjpeg',
212 'BLINK_PLATFORM_IMPLEMENTATION=1',
216 '<(angle_path)/include',
217 '<(SHARED_INTERMEDIATE_DIR)/blink',
220 # Some Mac-specific parts of WebKit won't compile without having this
221 # prefix header injected.
222 'GCC_PREFIX_HEADER': '<(DEPTH)/third_party/WebKit/Source/build/mac/Prefix.h',
225 '<@(platform_files)',
226 '<@(platform_heap_files)',
228 # Additional .cpp files from platform_generated.gyp:make_platform_generated actions.
229 '<(blink_platform_output_dir)/FontFamilyNames.cpp',
230 '<(blink_platform_output_dir)/RuntimeEnabledFeatures.cpp',
231 '<(blink_platform_output_dir)/RuntimeEnabledFeatures.h',
232 '<(blink_platform_output_dir)/ColorData.cpp',
235 # Exclude all platform specific things, reinclude them below on a per-platform basis
236 # FIXME: Figure out how to store these patterns in a variable.
237 ['exclude', '(cf|cg|mac|opentype|win)/'],
238 ['exclude', '(?<!Chromium)(CF|CG|Mac|Win)\\.(cpp|mm?)$'],
240 # *NEON.cpp files need special compile options.
241 # They are moved to the webcore_0_neon target.
242 ['exclude', 'graphics/cpu/arm/.*NEON\\.(cpp|h)'],
243 ['exclude', 'graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
245 # Disable c4267 warnings until we fix size_t to int truncations.
246 # Disable c4724 warnings which is generated in VS2012 due to improper
247 # compiler optimizations, see crbug.com/237063
248 'msvs_disabled_warnings': [ 4267, 4334, 4724 ],
250 ['target_arch == "ia32" or target_arch == "x64"', {
252 ['include', 'graphics/cpu/x86/WebGLImageConversionSSE\\.h$'],
255 ['OS=="linux" or OS=="android" or OS=="win"', {
257 # Cherry-pick files excluded by the broader regular expressions above.
258 ['include', 'fonts/opentype/OpenTypeTypes\\.h$'],
259 ['include', 'fonts/opentype/OpenTypeVerticalData\\.(cpp|h)$'],
262 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
266 ['OS=="linux" or OS=="android"', {
268 ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
270 }, { # OS!="linux" and OS!="android"
272 ['exclude', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
277 '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
281 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework',
282 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
283 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
287 # We use LocaleMac.mm instead of LocaleICU.cpp
288 ['exclude', 'text/LocaleICU\\.(cpp|h)$'],
289 ['include', 'text/LocaleMac\\.mm$'],
291 # The Mac uses mac/KillRingMac.mm instead of the dummy
293 ['exclude', 'KillRingNone\\.cpp$'],
295 # The Mac build is USE(CF).
296 ['include', 'CF\\.cpp$'],
298 # Use native Mac font code from core.
299 ['include', '(fonts/)?mac/[^/]*Font[^/]*\\.(cpp|mm?)$'],
301 # TODO(dro): Merge the opentype vertical data files inclusion across all platforms.
302 ['include', 'fonts/opentype/OpenTypeTypes\\.h$'],
303 ['include', 'fonts/opentype/OpenTypeVerticalData\\.(cpp|h)$'],
305 # Cherry-pick some files that can't be included by broader regexps.
306 # Some of these are used instead of Chromium platform files, see
307 # the specific exclusions in the "exclude" list below.
308 ['include', 'audio/mac/FFTFrameMac\\.cpp$'],
309 ['include', 'fonts/mac/GlyphPageTreeNodeMac\\.cpp$'],
310 ['include', 'mac/ColorMac\\.mm$'],
311 ['include', 'mac/BlockExceptions\\.mm$'],
312 ['include', 'mac/KillRingMac\\.mm$'],
313 ['include', 'mac/LocalCurrentGraphicsContext\\.mm$'],
314 ['include', 'mac/NSScrollerImpDetails\\.mm$'],
315 ['include', 'mac/ScrollAnimatorMac\\.mm$'],
316 ['include', 'mac/ThemeMac\\.h$'],
317 ['include', 'mac/ThemeMac\\.mm$'],
318 ['include', 'mac/VersionUtilMac\\.h$'],
319 ['include', 'mac/VersionUtilMac\\.mm$'],
320 ['include', 'mac/WebCoreNSCellExtras\\.h$'],
321 ['include', 'mac/WebCoreNSCellExtras\\.mm$'],
323 # Mac uses only ScrollAnimatorMac.
324 ['exclude', 'scroll/ScrollbarThemeNonMacCommon\\.(cpp|h)$'],
325 ['exclude', 'scroll/ScrollAnimatorNone\\.cpp$'],
326 ['exclude', 'scroll/ScrollAnimatorNone\\.h$'],
328 ['exclude', 'fonts/skia/FontCacheSkia\\.cpp$'],
330 ['include', 'geometry/mac/FloatPointMac\\.mm$'],
331 ['include', 'geometry/mac/FloatRectMac\\.mm$'],
332 ['include', 'geometry/mac/FloatSizeMac\\.mm$'],
333 ['include', 'geometry/mac/IntPointMac\\.mm$'],
334 ['include', 'geometry/mac/IntRectMac\\.mm$'],
336 ['include', 'geometry/cg/FloatPointCG\\.cpp$'],
337 ['include', 'geometry/cg/FloatRectCG\\.cpp$'],
338 ['include', 'geometry/cg/FloatSizeCG\\.cpp$'],
339 ['include', 'geometry/cg/IntPointCG\\.cpp$'],
340 ['include', 'geometry/cg/IntRectCG\\.cpp$'],
341 ['include', 'geometry/cg/IntSizeCG\\.cpp$'],
346 ['exclude', 'geometry/mac/'],
347 ['exclude', 'geometry/cg/'],
348 ['exclude', 'scroll/ScrollbarThemeMac'],
351 ['OS != "linux" and OS != "mac" and OS != "win"', {
353 ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
358 # We use LocaleWin.cpp instead of LocaleICU.cpp
359 ['exclude', 'text/LocaleICU\\.(cpp|h)$'],
360 ['include', 'text/LocaleWin\\.(cpp|h)$'],
362 ['include', 'clipboard/ClipboardUtilitiesWin\\.(cpp|h)$'],
364 ['include', 'fonts/opentype/'],
365 ['include', 'fonts/win/FontCacheSkiaWin\\.cpp$'],
366 ['include', 'fonts/win/FontFallbackWin\\.(cpp|h)$'],
367 ['include', 'fonts/win/FontPlatformDataWin\\.cpp$'],
369 # SystemInfo.cpp is useful and we don't want to copy it.
370 ['include', 'win/SystemInfo\\.cpp$'],
375 ['exclude', 'Win\\.cpp$'],
376 ['exclude', '/(Windows)[^/]*\\.cpp$'],
377 ['include', 'fonts/opentype/OpenTypeSanitizer\\.cpp$'],
380 ['OS=="win" and chromium_win_pch==1', {
382 ['include', '<(DEPTH)/third_party/WebKit/Source/build/win/Precompile.cpp'],
387 ['include', '^fonts/VDMXParser\\.cpp$'],
391 ['exclude', 'Android\\.cpp$'],
396 '<(DEPTH)/build/linux/system.gyp:fontconfig',
398 'export_dependent_settings': [
399 '<(DEPTH)/build/linux/system.gyp:fontconfig',
402 ['use_default_render_theme==0', {
404 ['exclude', 'scroll/ScrollbarThemeAura\\.(cpp|h)'],
407 ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
409 '<(DEPTH)/third_party/ffmpeg',
412 '<(DEPTH)/third_party/ffmpeg/ffmpeg.gyp:ffmpeg',
415 ['"WTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1" in feature_defines', {
417 '<(DEPTH)/third_party/openmax_dl',
420 '<(DEPTH)/third_party/openmax_dl/dl/dl.gyp:openmax_dl',
423 ['target_arch=="arm"', {
429 'target_conditions': [
432 ['include', 'exported/linux/WebFontRenderStyle\\.cpp$'],
433 ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
438 # The *NEON.cpp files fail to compile when -mthumb is passed. Force
439 # them to build in ARM mode.
440 # See https://bugs.webkit.org/show_bug.cgi?id=62916.
442 'target_name': 'blink_arm_neon',
444 ['target_arch=="arm"', {
445 'type': 'static_library',
449 'hard_dependency': 1,
451 '<@(platform_files)',
455 ['include', 'graphics/cpu/arm/filters/.*NEON\\.(cpp|h)'],
460 'cflags!': ['-mthumb'],
463 },{ # target_arch!="arm"