diff options
author | Steve Block <steveblock@google.com> | 2011-05-25 19:08:45 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-06-08 13:51:31 +0100 |
commit | 2bde8e466a4451c7319e3a072d118917957d6554 (patch) | |
tree | 28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/JavaScriptCore/gyp | |
parent | 6939c99b71d9372d14a0c74a772108052e8c48c8 (diff) | |
download | external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2 |
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/JavaScriptCore/gyp')
-rw-r--r-- | Source/JavaScriptCore/gyp/JavaScriptCore.gyp | 168 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/generate-dtrace-header.sh | 9 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/run-if-exists.sh | 5 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/update-info-plist.sh | 4 |
4 files changed, 108 insertions, 78 deletions
diff --git a/Source/JavaScriptCore/gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp index 1e46094..a520344 100644 --- a/Source/JavaScriptCore/gyp/JavaScriptCore.gyp +++ b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp @@ -3,30 +3,43 @@ '../../gyp/common.gypi', '../JavaScriptCore.gypi', ], - 'xcode_config_file': '<(DEPTH)/JavaScriptCore/Configurations/DebugRelease.xcconfig', + 'configurations': { + 'Production': { + 'xcode_config_file': '<(project_dir)/Configurations/Base.xcconfig', + }, + 'Profiling': { + 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig', + 'xcode_settings': { + 'STRIP_INSTALLED_PRODUCT': 'NO', + }, + }, + 'Release': { + 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig', + 'xcode_settings': { + 'STRIP_INSTALLED_PRODUCT': 'NO', + }, + }, + 'Debug': { + 'xcode_config_file': '<(project_dir)/Configurations/DebugRelease.xcconfig', + 'xcode_settings': { + 'DEAD_CODE_STRIPPING': '$(DEAD_CODE_STRIPPING_debug)', + 'DEBUG_DEFINES': '$(DEBUG_DEFINES_debug)', + 'GCC_OPTIMIZATION_LEVEL': '$(GCC_OPTIMIZATION_LEVEL_debug)', + 'STRIP_INSTALLED_PRODUCT': '$(STRIP_INSTALLED_PRODUCT_debug)', + }, + }, + }, 'variables': { - # FIXME: We should use a header map instead of listing these explicitly. 'javascriptcore_include_dirs': [ - '<(DEPTH)', # Some paths in API include JavaScriptCore/ - '<(DEPTH)/JavaScriptCore', - '<(DEPTH)/JavaScriptCore/ForwardingHeaders', - '<(DEPTH)/JavaScriptCore/API', - '<(DEPTH)/JavaScriptCore/assembler', - '<(DEPTH)/JavaScriptCore/collector/handles', - '<(DEPTH)/JavaScriptCore/bytecode', - '<(DEPTH)/JavaScriptCore/bytecompiler', - '<(DEPTH)/JavaScriptCore/debugger', - '<(DEPTH)/JavaScriptCore/icu', - '<(DEPTH)/JavaScriptCore/interpreter', - '<(DEPTH)/JavaScriptCore/jit', - '<(DEPTH)/JavaScriptCore/parser', - '<(DEPTH)/JavaScriptCore/profiler', - '<(DEPTH)/JavaScriptCore/runtime', - '<(DEPTH)/JavaScriptCore/wtf', - '<(DEPTH)/JavaScriptCore/wtf/unicode', - '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore', + '<(project_dir)', + '<(project_dir)/icu', ], }, + 'target_defaults': { + 'configurations': { + 'Profiling': {}, + }, + }, 'targets': [ { 'target_name': 'JavaScriptCore', @@ -37,15 +50,22 @@ ], 'include_dirs': [ '<@(javascriptcore_include_dirs)', + '<(PRODUCT_DIR)/DerivedSources/JavaScriptCore', ], + 'configurations': { + 'Production': { + 'INSTALL_PATH': '$(BUILT_PRODUCTS_DIR)', + }, + }, 'sources': [ '<@(javascriptcore_files)', '<@(javascriptcore_publicheader_files)', '<@(javascriptcore_privateheader_files)', + '<@(javascriptcore_derived_source_files)', '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', - 'libicucore.dylib', - 'libobjc.dylib', + '/usr/lib/libicucore.dylib', + '/usr/lib/libobjc.dylib', ], 'mac_framework_headers': [ '<@(javascriptcore_publicheader_files)', @@ -53,47 +73,41 @@ 'mac_framework_private_headers': [ '<@(javascriptcore_privateheader_files)', ], - 'xcode_config_file': '<(DEPTH)/JavaScriptCore/Configurations/JavaScriptCore.xcconfig', + 'xcode_config_file': '<(project_dir)/Configurations/JavaScriptCore.xcconfig', 'sources/': [ - ['exclude', 'qt'], - ['exclude', 'os-win32'], - ['exclude', 'wtf/android'], - ['exclude', 'wtf/brew'], - ['exclude', 'wtf/efl'], - ['exclude', 'wtf/gtk'], - ['exclude', 'wtf/qt'], - ['exclude', 'wtf/haiku'], - ['exclude', 'API/tests'], - ['exclude', 'wtf/url'], - ['exclude', 'wtf/wince'], - ['exclude', 'wtf/wx'], - ['exclude', 'wtf/unicode/brew'], - ['exclude', 'wtf/unicode/wince'], - ['exclude', 'wtf/unicode/glib'], - ['exclude', 'wtf/unicode/qt4'], + ['exclude', 'API/tests/'], + ['exclude', 'ForwardingHeaders/'], + ['exclude', '(?<!unicode)/icu/'], + ['exclude', 'os-win32/'], + ['exclude', 'qt/'], + ['exclude', 'wtf/(android|brew|efl|gtk|haiku|qt|wince|wx)/'], + ['exclude', 'wtf/unicode/brew/'], + ['exclude', 'wtf/unicode/glib/'], + ['exclude', 'wtf/unicode/qt4/'], + ['exclude', 'wtf/unicode/wince/'], + ['exclude', 'wtf/url/'], ['exclude', '/(gtk|glib|gobject)/.*\\.(cpp|h)$'], ['exclude', '(Default|Gtk|Chromium|None|Qt|Win|Wx|Symbian)\\.(cpp|mm|h)$'], - ['exclude', 'GCActivityCallback\.cpp'], - ['exclude', '.*BSTR.*$'], - ['exclude', 'jsc.cpp$'], + ['exclude', 'GCActivityCallback\.cpp$'], + ['exclude', 'BSTR[^/]*$'], ], 'postbuilds': [ { 'postbuild_name': 'Check For Global Initializers', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers' ], }, { 'postbuild_name': 'Check For Exit Time Destructors', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-exit-time-destructors' ], }, { 'postbuild_name': 'Check For Weak VTables and Externals', 'action': [ - 'sh', '<(DEPTH)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals' + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals' ], }, ], @@ -103,29 +117,8 @@ 'xcode_settings': { # FIXME: Remove these overrides once JavaScriptCore.xcconfig is # used only by this project. - 'GCC_PREFIX_HEADER': '<(DEPTH)/JavaScriptCore/JavaScriptCorePrefix.h', - 'INFOPLIST_FILE': '<(DEPTH)/JavaScriptCore/Info.plist', - # This setting mirrors the setting in Base.xcconfig, with - # one difference noted below. - 'WARNING_CFLAGS_BASE': [ - '-Wall', - '-Wextra', - '-Wcast-qual', - '-Wchar-subscripts', - '-Wextra-tokens', - '-Wformat=2', - '-Winit-self', - # FIXME: For some reason, -Wmissing-format-attribute causes a - # build error in Assertions.cpp in the GYP build but not in the - # non-GYP build. - # '-Wmissing-format-attribute', - '-Wmissing-noreturn', - '-Wpacked', - '-Wpointer-arith', - '-Wredundant-decls', - '-Wundef', - '-Wwrite-strings', - ], + 'GCC_PREFIX_HEADER': '<(project_dir)/JavaScriptCorePrefix.h', + 'INFOPLIST_FILE': '<(project_dir)/Info.plist', }, }], ], @@ -133,14 +126,26 @@ { 'target_name': 'Derived Sources', 'type': 'none', - 'actions': [{ - 'action_name': 'Generate Derived Sources', - 'inputs': [], - 'outputs': [], - 'action': [ - 'sh', 'generate-derived-sources.sh', - ], - }], + 'actions': [ + { + 'action_name': 'Generate Derived Sources', + 'inputs': [], + 'outputs': [ + '<@(javascriptcore_derived_source_files)', + ], + 'action': [ + 'sh', 'generate-derived-sources.sh' + ], + }, + { + 'action_name': 'Generate DTrace Header', + 'inputs': [], + 'outputs': [], + 'action': [ + 'sh', '<(project_dir)/gyp/generate-dtrace-header.sh', '<(project_dir)' + ] + } + ], }, { 'target_name': 'Update Version', @@ -150,7 +155,7 @@ 'inputs': [], 'outputs': [], 'action': [ - 'sh', '<(DEPTH)/gyp/update-info-plist.sh', '<(DEPTH)/JavaScriptCore/Info.plist' + 'sh', '<(project_dir)/gyp/update-info-plist.sh', '<(project_dir)/Info.plist' ] }], }, @@ -206,10 +211,17 @@ 'include_dirs': [ '<@(javascriptcore_include_dirs)', ], + 'configurations': { + 'Production': { + 'xcode_settings': { + 'INSTALL_PATH': '$(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources', + }, + }, + }, 'sources': [ '<@(jsc_files)', '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', - 'libedit.dylib', + '/usr/lib/libedit.dylib', ], }, ], # targets diff --git a/Source/JavaScriptCore/gyp/generate-dtrace-header.sh b/Source/JavaScriptCore/gyp/generate-dtrace-header.sh new file mode 100755 index 0000000..a3c31dd --- /dev/null +++ b/Source/JavaScriptCore/gyp/generate-dtrace-header.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +TRACING_D="$1/runtime/Tracing.d"; +TRACING_H="$BUILT_PRODUCTS_DIR/DerivedSources/JavaScriptCore/TracingDtrace.h"; + +if [[ "${HAVE_DTRACE}" = "1" && "${TRACING_D}" -nt "${TRACING_H}" ]]; then + dtrace -h -o "${TRACING_H}" -s "${TRACING_D}"; +fi; + diff --git a/Source/JavaScriptCore/gyp/run-if-exists.sh b/Source/JavaScriptCore/gyp/run-if-exists.sh new file mode 100755 index 0000000..242ffc8 --- /dev/null +++ b/Source/JavaScriptCore/gyp/run-if-exists.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -f $1 ]; then + $1 || exit $?; +fi diff --git a/Source/JavaScriptCore/gyp/update-info-plist.sh b/Source/JavaScriptCore/gyp/update-info-plist.sh new file mode 100755 index 0000000..d02ecce --- /dev/null +++ b/Source/JavaScriptCore/gyp/update-info-plist.sh @@ -0,0 +1,4 @@ +# Touch Info.plist to let Xcode know it needs to copy it into the built product +if [[ "${CONFIGURATION}" != "Production" ]]; then + touch "$1"; +fi |