summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/WebCore.gyp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/WebCore.gyp
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/WebCore.gyp')
-rw-r--r--Source/WebCore/WebCore.gyp/WebCore.gyp207
-rwxr-xr-xSource/WebCore/WebCore.gyp/mac/check_objc_rename.sh79
2 files changed, 224 insertions, 62 deletions
diff --git a/Source/WebCore/WebCore.gyp/WebCore.gyp b/Source/WebCore/WebCore.gyp/WebCore.gyp
index f96753c..b155b50 100644
--- a/Source/WebCore/WebCore.gyp/WebCore.gyp
+++ b/Source/WebCore/WebCore.gyp/WebCore.gyp
@@ -45,7 +45,9 @@
},
},{
# WebKit is checked out in src/chromium/third_party/WebKit
- 'variables': {'chromium_src_dir': '../../../../..'},
+ 'variables': {
+ 'chromium_src_dir': '../../../../..',
+ },
}],
['OS == "mac"', {
'targets': [
@@ -104,6 +106,13 @@
'cflags!': ['-g'],
},
}],
+ ['OS=="linux" and target_arch=="arm"', {
+ # Due to a bug in gcc arm, we get warnings about uninitialized timesNewRoman.unstatic.3258
+ # and colorTransparent.unstatic.4879.
+ 'target_defaults': {
+ 'cflags': ['-Wno-uninitialized'],
+ },
+ }],
], # conditions
'variables': {
@@ -115,6 +124,10 @@
# binary and increasing the speed of gdb.
'enable_svg%': 1,
+ # Use v8 as default JavaScript engine. This makes sure that javascript_engine variable
+ # is set for both inside_chromium_build 0 and 1 cases.
+ 'javascript_engine%': 'v8',
+
'webcore_include_dirs': [
'../',
'../accessibility',
@@ -248,7 +261,6 @@
# FIXME: Eliminate dependency on platform/graphics/mac and
# related directories.
# platform/graphics/cg may need to stick around, though.
- '../loader/archive/cf',
'../platform/audio/mac',
'../platform/graphics/mac',
'../platform/mac',
@@ -748,7 +760,7 @@
'webcore_bindings_sources',
'inspector_protocol_sources',
'injected_script_source',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/skia/skia.gyp:skia',
@@ -852,12 +864,17 @@
},
}],
# FIXME: (kbr) ideally this target should just depend on webcore_prerequisites
- # to pick up this include directory, but I'm nervous about making that change.
+ # to pick up these include directories, but I'm nervous about making that change.
['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
'include_dirs': [
'<(chromium_src_dir)/third_party/mkl/include',
],
}],
+ ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
+ 'include_dirs': [
+ '<(chromium_src_dir)/third_party/fftw/api',
+ ],
+ }],
],
},
{
@@ -867,7 +884,7 @@
'type': 'none',
'dependencies': [
'webcore_bindings',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/skia/skia.gyp:skia',
@@ -884,7 +901,7 @@
],
'export_dependent_settings': [
'webcore_bindings',
- '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
+ '../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:yarr',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/skia/skia.gyp:skia',
@@ -936,9 +953,11 @@
],
'conditions': [
['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
- 'defines': [
- 'USING_V8_SHARED',
- ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ 'USING_V8_SHARED',
+ ],
+ },
}],
],
}],
@@ -959,20 +978,24 @@
'<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
'<(chromium_src_dir)/build/linux/system.gyp:gtk',
],
- 'cflags': [
- # WebCore does not work with strict aliasing enabled.
- # https://bugs.webkit.org/show_bug.cgi?id=25864
- '-fno-strict-aliasing',
- ],
+ 'direct_dependent_settings': {
+ 'cflags': [
+ # WebCore does not work with strict aliasing enabled.
+ # https://bugs.webkit.org/show_bug.cgi?id=25864
+ '-fno-strict-aliasing',
+ ],
+ },
}],
['OS=="linux"', {
- 'defines': [
- # Mozilla on Linux effectively uses uname -sm, but when running
- # 32-bit x86 code on an x86_64 processor, it uses
- # "Linux i686 (x86_64)". Matching that would require making a
- # run-time determination.
- 'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
- ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ # Mozilla on Linux effectively uses uname -sm, but when running
+ # 32-bit x86 code on an x86_64 processor, it uses
+ # "Linux i686 (x86_64)". Matching that would require making a
+ # run-time determination.
+ 'WEBCORE_NAVIGATOR_PLATFORM="Linux i686"',
+ ],
+ },
}],
['OS=="mac"', {
'dependencies': [
@@ -981,34 +1004,56 @@
'export_dependent_settings': [
'webkit_system_interface',
],
- 'defines': [
- # Match Safari and Mozilla on Mac x86.
- 'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
-
- # Chromium's version of WebCore includes the following Objective-C
- # classes. The system-provided WebCore framework may also provide
- # these classes. Because of the nature of Objective-C binding
- # (dynamically at runtime), it's possible for the Chromium-provided
- # versions to interfere with the system-provided versions. This may
- # happen when a system framework attempts to use WebCore.framework,
- # such as when converting an HTML-flavored string to an
- # NSAttributedString. The solution is to force Objective-C class
- # names that would conflict to use alternate names.
+ 'direct_dependent_settings': {
+ 'defines': [
+ # Match Safari and Mozilla on Mac x86.
+ 'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
- # FIXME: This list will hopefully shrink but may also grow.
- # Periodically run:
- # nm libwebcore.a | grep -E '[atsATS] ([+-]\[|\.objc_class_name)'
- # and make sure that everything listed there has the alternate
- # ChromiumWebCoreObjC name, and that nothing extraneous is listed
- # here. If all Objective-C can be eliminated from Chromium's WebCore
- # library, these defines should be removed entirely.
- 'ScrollbarPrefsObserver=ChromiumWebCoreObjCScrollbarPrefsObserver',
- 'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
- 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
- ],
- 'include_dirs': [
- '../../../WebKitLibraries',
- ],
+ # Chromium's version of WebCore includes the following Objective-C
+ # classes. The system-provided WebCore framework may also provide
+ # these classes. Because of the nature of Objective-C binding
+ # (dynamically at runtime), it's possible for the
+ # Chromium-provided versions to interfere with the system-provided
+ # versions. This may happen when a system framework attempts to
+ # use WebCore.framework, such as when converting an HTML-flavored
+ # string to an NSAttributedString. The solution is to force
+ # Objective-C class names that would conflict to use alternate
+ # names.
+ #
+ # This list will hopefully shrink but may also grow. Its
+ # performance is monitored by the "Check Objective-C Rename"
+ # postbuild step, and any suspicious-looking symbols not handled
+ # here or whitelisted in that step will cause a build failure.
+ #
+ # If this is unhandled, the console will receive log messages
+ # such as:
+ # 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.
+ 'ScrollbarPrefsObserver=ChromiumWebCoreObjCScrollbarPrefsObserver',
+ 'WebCoreRenderThemeNotificationObserver=ChromiumWebCoreObjCWebCoreRenderThemeNotificationObserver',
+ 'WebFontCache=ChromiumWebCoreObjCWebFontCache',
+ ],
+ 'include_dirs': [
+ '../../../WebKitLibraries',
+ ],
+ 'postbuilds': [
+ {
+ # This step ensures that any Objective-C names that aren't
+ # redefined to be "safe" above will cause a build failure.
+ 'postbuild_name': 'Check Objective-C Rename',
+ 'variables': {
+ 'class_whitelist_regex':
+ 'ChromiumWebCoreObjC|TCMVisibleView|RTCMFlippedView',
+ 'category_whitelist_regex':
+ 'TCMInterposing',
+ },
+ 'action': [
+ 'mac/check_objc_rename.sh',
+ '<(class_whitelist_regex)',
+ '<(category_whitelist_regex)',
+ ],
+ },
+ ],
+ },
}],
['OS=="win"', {
'dependencies': [
@@ -1017,14 +1062,16 @@
'export_dependent_settings': [
'<(chromium_src_dir)/build/win/system.gyp:cygwin'
],
- 'defines': [
- # Match Safari and Mozilla on Windows.
- 'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
- '__PRETTY_FUNCTION__=__FUNCTION__',
- ],
- # This is needed because Event.h in this directory is blocked
- # by a system header on windows.
- 'include_dirs++': ['../dom'],
+ 'direct_dependent_settings': {
+ 'defines': [
+ # Match Safari and Mozilla on Windows.
+ 'WEBCORE_NAVIGATOR_PLATFORM="Win32"',
+ '__PRETTY_FUNCTION__=__FUNCTION__',
+ ],
+ # This is needed because Event.h in this directory is blocked
+ # by a system header on windows.
+ 'include_dirs++': ['../dom'],
+ },
}],
['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_MKL=1" in feature_defines', {
# This directory needs to be on the include path for multiple sub-targets of webcore.
@@ -1034,6 +1081,14 @@
],
},
}],
+ ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
+ # This directory needs to be on the include path for multiple sub-targets of webcore.
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(chromium_src_dir)/third_party/fftw/api',
+ ],
+ },
+ }],
],
},
{
@@ -1096,7 +1151,7 @@
# Exclude things that don't apply to the Chromium platform on the basis
# of their enclosing directories and tags at the ends of their
# filenames.
- ['exclude', '(android|cairo|cf|cg|curl|gtk|haiku|linux|mac|mkl|opentype|posix|qt|soup|svg|symbian|win|wx)/'],
+ ['exclude', '(android|cairo|cf|cg|curl|fftw|gtk|haiku|linux|mac|mkl|opentype|posix|qt|soup|svg|symbian|win|wx)/'],
['exclude', '(?<!Chromium)(Android|Cairo|CF|CG|Curl|Gtk|Linux|Mac|OpenType|POSIX|Posix|Qt|Safari|Soup|Symbian|Win|Wx)\\.(cpp|mm?)$'],
# A few things can't be excluded by patterns. List them individually.
@@ -1136,10 +1191,6 @@
'<(chromium_src_dir)/third_party/harfbuzz/harfbuzz.gyp:harfbuzz',
],
}],
- ['OS=="linux" and target_arch=="arm"', {
- # Due to a bug in gcc arm, we get warnings about uninitialized timesNewRoman.unstatic.3258
- 'cflags': ['-Wno-uninitialized'],
- }],
['OS=="mac"', {
# Necessary for Mac .mm stuff.
'include_dirs': [
@@ -1187,7 +1238,6 @@
# Some of these are used instead of Chromium platform files, see
# the specific exclusions in the "sources!" list below.
['include', 'rendering/RenderThemeMac\\.mm$'],
- ['include', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
['include', 'platform/graphics/mac/ColorMac\\.mm$'],
['include', 'platform/graphics/mac/FloatPointMac\\.mm$'],
['include', 'platform/graphics/mac/FloatRectMac\\.mm$'],
@@ -1270,6 +1320,11 @@
['include', 'platform/audio/mkl/FFTFrameMKL\\.cpp$'],
],
}],
+ ['(OS=="linux" or OS=="win") and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
+ 'sources/': [
+ ['include', 'platform/audio/fftw/FFTFrameFFTW\\.cpp$'],
+ ],
+ }],
],
},
{
@@ -1328,6 +1383,12 @@
# Don't build IDBKeyPathBackendImpl. We have our own implementation.
['exclude', 'storage/IDBKeyPathBackendImpl\\.cpp$'],
+ # Don't build files needed for WebArchive support, since we disable
+ # this feature.
+ ['exclude', 'loader/archive/cf/LegacyWebArchive\\.cpp$'],
+ ['exclude', 'loader/archive/cf/LegacyWebArchiveMac\\.mm$'],
+ ['exclude', 'loader/archive/ArchiveFactory\\.cpp$'],
+
# Use loader/icon/IconDatabaseNone.cpp instead.
['exclude', 'loader/icon/IconDatabase\\.cpp$'],
@@ -1418,6 +1479,11 @@
['exclude', '/(Windows|Uniscribe)[^/]*\\.cpp$']
],
}],
+ ['javascript_engine=="v8"', {
+ 'dependencies': [
+ '<(chromium_src_dir)/v8/src/extensions/experimental/experimental.gyp:i18n_api',
+ ],
+ }],
],
},
{
@@ -1501,6 +1567,23 @@
},
},
}],
+ ['OS=="linux" and "WTF_USE_WEBAUDIO_FFTW=1" in feature_defines', {
+ # FIXME: (kbr) figure out how to make these dependencies
+ # work in a cross-platform way. Attempts to use
+ # "link_settings" and "libraries" in conjunction with the
+ # msvs-specific settings didn't work so far.
+ 'all_dependent_settings': {
+ 'ldflags': [
+ # FIXME: (kbr) build the FFTW into PRODUCT_DIR using GYP.
+ '-Lthird_party/fftw/.libs',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-lfftw3f'
+ ],
+ },
+ },
+ }],
['enable_svg!=0', {
'dependencies': [
'webcore_svg',
diff --git a/Source/WebCore/WebCore.gyp/mac/check_objc_rename.sh b/Source/WebCore/WebCore.gyp/mac/check_objc_rename.sh
new file mode 100755
index 0000000..ed3c119
--- /dev/null
+++ b/Source/WebCore/WebCore.gyp/mac/check_objc_rename.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+#
+# Copyright (C) 2011 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# This script checks a WebCore static library for potential Objective-C
+# class name collisions with the system's copy of the WebCore framework.
+# See the postbuild action that calls it from ../WebCore.gyp for details.
+
+set -e
+set -o pipefail
+
+if [[ $# -ne 2 ]]; then
+ echo "usage: ${0} class_whitelist_pattern category_whitelist_pattern" >& 2
+ exit 1
+fi
+
+lib="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}"
+nm_pattern='[atsATS] ([+-]\[|\.objc_class_name_)'
+
+class_whitelist_pattern="${1}"
+category_whitelist_pattern="${2}"
+
+# Send nm's stderr in the pipeline to /dev/null to avoid spewing
+# "nm: no name list" messages. This means that if the pipelined nm fails, there
+# won't be any output, so if the entire assignment fails, run nm again to get
+# some output.
+violators=$(nm -p "${lib}" 2> /dev/null | \
+ (grep -E "${nm_pattern}" || true) | \
+ (grep -Ev "${nm_pattern}(${class_whitelist_pattern})" || true) | \
+ (grep -Ev "\((${category_whitelist_pattern})\)" || true)) || nm -p "${lib}"
+
+if [[ -z "${violators}" ]]; then
+ # An empty list means that everything's clean.
+ exit 0
+fi
+
+cat << __EOF__ >&2
+These Objective-C symbols may clash with those provided by the system's own
+WebCore framework:
+${violators}
+
+These symbols were found in:
+${lib}
+
+This should be corrected by adding the appropriate definitions to
+$(dirname ${0})/../WebCore.gyp
+or by updating the whitelist in
+${0}
+__EOF__
+
+exit 1