Commit d8d3cd29 authored by mrowe@apple.com's avatar mrowe@apple.com

Mac production build fix.

Move the shell script build phase to copy jsc into JavaScriptCore.framework
out of the jsc target and in to the All target so that it's not run during
production builds. Xcode appears to the parent directories of paths referenced
in the Output Files of the build phase, which leads to problems when the
SYMROOT for the JavaScriptCore framework and the jsc executables are later merged.

I've also fixed the path to the Resources folder in the script while I'm here.
On iOS the framework bundle is shallow so the correct destination is Resources/
rather than Versions/A/Resources. This is handled by tweaking the
JAVASCRIPTCORE_RESOURCES_DIR configuration setting to be relative rather than
a complete path so we can reuse it in the script. The references in JSC.xcconfig
and ToolExecutable.xcconfig are updated to prepend JAVASCRIPTCORE_FRAMEWORKS_DIR
to preserve their former values.

* Configurations/Base.xcconfig:
* Configurations/JSC.xcconfig:
* Configurations/ToolExecutable.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 22545813
2014-01-21 Mark Rowe <mrowe@apple.com>
Mac production build fix.
Move the shell script build phase to copy jsc into JavaScriptCore.framework
out of the jsc target and in to the All target so that it's not run during
production builds. Xcode appears to the parent directories of paths referenced
in the Output Files of the build phase, which leads to problems when the
SYMROOT for the JavaScriptCore framework and the jsc executables are later merged.
I've also fixed the path to the Resources folder in the script while I'm here.
On iOS the framework bundle is shallow so the correct destination is Resources/
rather than Versions/A/Resources. This is handled by tweaking the
JAVASCRIPTCORE_RESOURCES_DIR configuration setting to be relative rather than
a complete path so we can reuse it in the script. The references in JSC.xcconfig
and ToolExecutable.xcconfig are updated to prepend JAVASCRIPTCORE_FRAMEWORKS_DIR
to preserve their former values.
* Configurations/Base.xcconfig:
* Configurations/JSC.xcconfig:
* Configurations/ToolExecutable.xcconfig:
* JavaScriptCore.xcodeproj/project.pbxproj:
2014-01-19 Andreas Kling <akling@apple.com>
JSC Parser: Shrink BindingNode.
......
......@@ -101,9 +101,9 @@ JAVASCRIPTCORE_FRAMEWORKS_DIR_macosx_USE_STAGING_INSTALL_PATH_NO = $(NORMAL_JAVA
JAVASCRIPTCORE_FRAMEWORKS_DIR_macosx_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
JAVASCRIPTCORE_RESOURCES_DIR = $(JAVASCRIPTCORE_RESOURCES_DIR_$(PLATFORM_NAME));
JAVASCRIPTCORE_RESOURCES_DIR_iphoneos = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Resources;
JAVASCRIPTCORE_RESOURCES_DIR_iphoneos = JavaScriptCore.framework/Resources;
JAVASCRIPTCORE_RESOURCES_DIR_iphonesimulator = $(JAVASCRIPTCORE_RESOURCES_DIR_iphoneos);
JAVASCRIPTCORE_RESOURCES_DIR_macosx = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/JavaScriptCore.framework/Versions/A/Resources;
JAVASCRIPTCORE_RESOURCES_DIR_macosx = JavaScriptCore.framework/Versions/A/Resources;
// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
......
......@@ -24,7 +24,7 @@
#include "FeatureDefines.xcconfig"
#include "Version.xcconfig"
INSTALL_PATH_ACTUAL = $(JAVASCRIPTCORE_RESOURCES_DIR);
INSTALL_PATH_ACTUAL = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/$(JAVASCRIPTCORE_RESOURCES_DIR);
PRODUCT_NAME = jsc;
CODE_SIGN_ENTITLEMENTS = $(CODE_SIGN_ENTITLEMENTS_$(PLATFORM_NAME));
CODE_SIGN_ENTITLEMENTS_iphoneos = entitlements.plist;
......@@ -24,7 +24,7 @@
#include "FeatureDefines.xcconfig"
#include "Version.xcconfig"
INSTALL_PATH_ACTUAL = $(JAVASCRIPTCORE_RESOURCES_DIR);
INSTALL_PATH_ACTUAL = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/$(JAVASCRIPTCORE_RESOURCES_DIR);
PRODUCT_NAME = $(TARGET_NAME);
CODE_SIGN_ENTITLEMENTS = $(CODE_SIGN_ENTITLEMENTS_$(PLATFORM_NAME)_$(TARGET_NAME));
CODE_SIGN_ENTITLEMENTS_iphoneos_minidom = entitlements.plist;
......
......@@ -46,6 +46,7 @@
isa = PBXAggregateTarget;
buildConfigurationList = 149C276C08902AFE008A9EFC /* Build configuration list for PBXAggregateTarget "All" */;
buildPhases = (
5DF7E1CC188E6B87003F9A46 /* Copy jsc into JavaScriptCore.framework */,
);
dependencies = (
932F5BE70822A1C700736975 /* PBXTargetDependency */,
......@@ -5308,7 +5309,6 @@
buildPhases = (
932F5BDC0822A1C700736975 /* Sources */,
932F5BDE0822A1C700736975 /* Frameworks */,
5D5D8ABF0E0D0B0300F9C692 /* Copy Into Framework */,
);
buildRules = (
);
......@@ -5472,37 +5472,37 @@
shellPath = /bin/sh;
shellScript = "TRACING_D=\"$SRCROOT/runtime/Tracing.d\";\nTRACING_H=\"$BUILT_PRODUCTS_DIR/DerivedSources/JavaScriptCore/TracingDtrace.h\";\n\nif [[ \"$HAVE_DTRACE\" = \"1\" && \"$TRACING_D\" -nt \"$TRACING_H\" ]];\nthen\n\tdtrace -h -o \"$TRACING_H\" -s \"$TRACING_D\";\nfi;\n";
};
5D5D8ABF0E0D0B0300F9C692 /* Copy Into Framework */ = {
5DAFD6CD146B6B6E00FBEFB4 /* Install Support Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
buildActionMask = 8;
files = (
);
inputPaths = (
"$(BUILT_PRODUCTS_DIR)/jsc",
"$(SRCROOT)/API/tests/testapi.js",
);
name = "Copy Into Framework";
name = "Install Support Script";
outputPaths = (
"$(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/Resources/jsc",
"$(DSTROOT)$(INSTALL_PATH)/testapi.js",
);
runOnlyForDeploymentPostprocessing = 0;
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
shellScript = "# Skip for Production builds.\nif [[ ${CONFIGURATION:=Debug} == \"Production\" ]]; then\n exit\nfi\n\n# Copy and update the jsc binary to refer to JavaScriptCore.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\ninstall_name_tool -change \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/JavaScriptCore.framework/Resources/jsc\"\n";
shellScript = "if [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then\n cp \"${SRCROOT}/API/tests/testapi.js\" \"${DSTROOT}${INSTALL_PATH}/testapi.js\"\nfi\n";
};
5DAFD6CD146B6B6E00FBEFB4 /* Install Support Script */ = {
5DF7E1CC188E6B87003F9A46 /* Copy jsc into JavaScriptCore.framework */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/API/tests/testapi.js",
"$(BUILT_PRODUCTS_DIR)/jsc",
);
name = "Install Support Script";
name = "Copy jsc into JavaScriptCore.framework";
outputPaths = (
"$(DSTROOT)$(INSTALL_PATH)/testapi.js",
"$(BUILT_PRODUCTS_DIR)/$(JAVASCRIPTCORE_RESOURCES_DIR)/jsc",
);
runOnlyForDeploymentPostprocessing = 1;
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then\n cp \"${SRCROOT}/API/tests/testapi.js\" \"${DSTROOT}${INSTALL_PATH}/testapi.js\"\nfi\n";
shellScript = "# Skip for Production builds.\nif [[ ${CONFIGURATION:=Debug} == \"Production\" ]]; then\n exit\nfi\n\n# Copy and update the jsc binary to refer to JavaScriptCore.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/${JAVASCRIPTCORE_RESOURCES_DIR}/jsc\"\ninstall_name_tool -change \"${JAVASCRIPTCORE_FRAMEWORKS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/${JAVASCRIPTCORE_RESOURCES_DIR}/jsc\"\n";
};
65FB3F6509D11E9100F49DEB /* Generate Derived Sources */ = {
isa = PBXShellScriptBuildPhase;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment