diff options
Diffstat (limited to 'Source/JavaScriptCore/gyp')
-rw-r--r-- | Source/JavaScriptCore/gyp/JavaScriptCore.gyp | 228 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/generate-derived-sources.sh | 9 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/generate-dtrace-header.sh | 9 | ||||
-rw-r--r-- | Source/JavaScriptCore/gyp/gtk.gyp | 18 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/run-if-exists.sh | 5 | ||||
-rwxr-xr-x | Source/JavaScriptCore/gyp/update-info-plist.sh | 4 |
6 files changed, 273 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/gyp/JavaScriptCore.gyp b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp new file mode 100644 index 0000000..a520344 --- /dev/null +++ b/Source/JavaScriptCore/gyp/JavaScriptCore.gyp @@ -0,0 +1,228 @@ +{ + 'includes': [ + '../../gyp/common.gypi', + '../JavaScriptCore.gypi', + ], + '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': { + 'javascriptcore_include_dirs': [ + '<(project_dir)', + '<(project_dir)/icu', + ], + }, + 'target_defaults': { + 'configurations': { + 'Profiling': {}, + }, + }, + 'targets': [ + { + 'target_name': 'JavaScriptCore', + 'type': 'shared_library', + 'dependencies': [ + 'Derived Sources', + 'Update Version', + ], + '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', + '/usr/lib/libicucore.dylib', + '/usr/lib/libobjc.dylib', + ], + 'mac_framework_headers': [ + '<@(javascriptcore_publicheader_files)', + ], + 'mac_framework_private_headers': [ + '<@(javascriptcore_privateheader_files)', + ], + 'xcode_config_file': '<(project_dir)/Configurations/JavaScriptCore.xcconfig', + 'sources/': [ + ['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[^/]*$'], + ], + 'postbuilds': [ + { + 'postbuild_name': 'Check For Global Initializers', + 'action': [ + 'sh', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-global-initializers' + ], + }, + { + 'postbuild_name': 'Check For Exit Time Destructors', + 'action': [ + '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', '<(project_dir)/gyp/run-if-exists.sh', '<(DEPTH)/../Tools/Scripts/check-for-weak-vtables-and-externals' + ], + }, + ], + 'conditions': [ + ['OS=="mac"', { + 'mac_bundle': 1, + 'xcode_settings': { + # FIXME: Remove these overrides once JavaScriptCore.xcconfig is + # used only by this project. + 'GCC_PREFIX_HEADER': '<(project_dir)/JavaScriptCorePrefix.h', + 'INFOPLIST_FILE': '<(project_dir)/Info.plist', + }, + }], + ], + }, + { + 'target_name': 'Derived Sources', + 'type': 'none', + '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', + 'type': 'none', + 'actions': [{ + 'action_name': 'Update Info.plist with version information', + 'inputs': [], + 'outputs': [], + 'action': [ + 'sh', '<(project_dir)/gyp/update-info-plist.sh', '<(project_dir)/Info.plist' + ] + }], + }, + { + 'target_name': 'minidom', + 'type': 'executable', + 'dependencies': [ + 'JavaScriptCore', + ], + # FIXME: We should use a header map instead of listing these explicitly. + 'include_dirs': [ + '<@(javascriptcore_include_dirs)', + ], + 'sources': [ + '<@(minidom_files)', + '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', + ], + 'copies': [{ + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<@(minidom_support_files)', + ], + }], + }, + { + 'target_name': 'testapi', + 'type': 'executable', + 'dependencies': [ + 'JavaScriptCore', + ], + # FIXME: We should use a header map instead of listing these explicitly. + 'include_dirs': [ + '<@(javascriptcore_include_dirs)', + ], + 'sources': [ + '<@(testapi_files)', + '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', + ], + 'copies': [{ + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<@(testapi_support_files)', + ], + }], + }, + { + 'target_name': 'jsc', + 'type': 'executable', + 'dependencies': [ + 'JavaScriptCore', + ], + # FIXME: We should use a header map instead of listing these explicitly. + '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', + '/usr/lib/libedit.dylib', + ], + }, + ], # targets +} diff --git a/Source/JavaScriptCore/gyp/generate-derived-sources.sh b/Source/JavaScriptCore/gyp/generate-derived-sources.sh new file mode 100755 index 0000000..fcd3056 --- /dev/null +++ b/Source/JavaScriptCore/gyp/generate-derived-sources.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +mkdir -p "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/docs" +cd "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" + +/bin/ln -sfh "${SRCROOT}/.." JavaScriptCore +export JavaScriptCore="JavaScriptCore" + +make -f "JavaScriptCore/DerivedSources.make" -j `/usr/sbin/sysctl -n hw.ncpu` 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/gtk.gyp b/Source/JavaScriptCore/gyp/gtk.gyp new file mode 100644 index 0000000..33eaa17 --- /dev/null +++ b/Source/JavaScriptCore/gyp/gtk.gyp @@ -0,0 +1,18 @@ +{ # Just a stub file to allow Source/gyp/configure to run successfully for testing. + 'includes': [ + '../../gyp/common.gypi', + '../JavaScriptCore.gypi', + ], + 'targets': [ + { + 'target_name': 'JavaScriptCore', + 'type': 'static_library', + 'sources': [ + '<@(javascriptcore_files)', + '<@(javascriptcore_publicheader_files)', + '<@(javascriptcore_privateheader_files)', + '<@(javascriptcore_derived_source_files)', + ], + }, + ], # targets +} 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 |