Title: [162434] trunk/Source/_javascript_Core
Revision
162434
Author
mr...@apple.com
Date
2014-01-21 03:47:42 -0800 (Tue, 21 Jan 2014)

Log Message

Mac production build fix.

Move the shell script build phase to copy jsc into _javascript_Core.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 _javascript_Core 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
_javascript_CORE_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 _javascript_CORE_FRAMEWORKS_DIR
to preserve their former values.

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

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (162433 => 162434)


--- trunk/Source/_javascript_Core/ChangeLog	2014-01-21 10:50:37 UTC (rev 162433)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-01-21 11:47:42 UTC (rev 162434)
@@ -1,3 +1,26 @@
+2014-01-21  Mark Rowe  <mr...@apple.com>
+
+        Mac production build fix.
+
+        Move the shell script build phase to copy jsc into _javascript_Core.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 _javascript_Core 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
+        _javascript_CORE_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 _javascript_CORE_FRAMEWORKS_DIR
+        to preserve their former values.
+
+        * Configurations/Base.xcconfig:
+        * Configurations/JSC.xcconfig:
+        * Configurations/ToolExecutable.xcconfig:
+        * _javascript_Core.xcodeproj/project.pbxproj:
+
 2014-01-19  Andreas Kling  <akl...@apple.com>
 
         JSC Parser: Shrink BindingNode.

Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (162433 => 162434)


--- trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2014-01-21 10:50:37 UTC (rev 162433)
+++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2014-01-21 11:47:42 UTC (rev 162434)
@@ -101,9 +101,9 @@
 _javascript_CORE_FRAMEWORKS_DIR_macosx_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
 
 _javascript_CORE_RESOURCES_DIR = $(_javascript_CORE_RESOURCES_DIR_$(PLATFORM_NAME));
-_javascript_CORE_RESOURCES_DIR_iphoneos = $(_javascript_CORE_FRAMEWORKS_DIR)/_javascript_Core.framework/Resources;
+_javascript_CORE_RESOURCES_DIR_iphoneos = _javascript_Core.framework/Resources;
 _javascript_CORE_RESOURCES_DIR_iphonesimulator = $(_javascript_CORE_RESOURCES_DIR_iphoneos);
-_javascript_CORE_RESOURCES_DIR_macosx = $(_javascript_CORE_FRAMEWORKS_DIR)/_javascript_Core.framework/Versions/A/Resources;
+_javascript_CORE_RESOURCES_DIR_macosx = _javascript_Core.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.

Modified: trunk/Source/_javascript_Core/Configurations/JSC.xcconfig (162433 => 162434)


--- trunk/Source/_javascript_Core/Configurations/JSC.xcconfig	2014-01-21 10:50:37 UTC (rev 162433)
+++ trunk/Source/_javascript_Core/Configurations/JSC.xcconfig	2014-01-21 11:47:42 UTC (rev 162434)
@@ -24,7 +24,7 @@
 #include "FeatureDefines.xcconfig"
 #include "Version.xcconfig"
 
-INSTALL_PATH_ACTUAL = $(_javascript_CORE_RESOURCES_DIR);
+INSTALL_PATH_ACTUAL = $(_javascript_CORE_FRAMEWORKS_DIR)/$(_javascript_CORE_RESOURCES_DIR);
 PRODUCT_NAME = jsc;
 CODE_SIGN_ENTITLEMENTS = $(CODE_SIGN_ENTITLEMENTS_$(PLATFORM_NAME));
 CODE_SIGN_ENTITLEMENTS_iphoneos = entitlements.plist;

Modified: trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig (162433 => 162434)


--- trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig	2014-01-21 10:50:37 UTC (rev 162433)
+++ trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig	2014-01-21 11:47:42 UTC (rev 162434)
@@ -24,7 +24,7 @@
 #include "FeatureDefines.xcconfig"
 #include "Version.xcconfig"
 
-INSTALL_PATH_ACTUAL = $(_javascript_CORE_RESOURCES_DIR);
+INSTALL_PATH_ACTUAL = $(_javascript_CORE_FRAMEWORKS_DIR)/$(_javascript_CORE_RESOURCES_DIR);
 PRODUCT_NAME = $(TARGET_NAME);
 CODE_SIGN_ENTITLEMENTS = $(CODE_SIGN_ENTITLEMENTS_$(PLATFORM_NAME)_$(TARGET_NAME));
 CODE_SIGN_ENTITLEMENTS_iphoneos_minidom = entitlements.plist;

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (162433 => 162434)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2014-01-21 10:50:37 UTC (rev 162433)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2014-01-21 11:47:42 UTC (rev 162434)
@@ -46,6 +46,7 @@
 			isa = PBXAggregateTarget;
 			buildConfigurationList = 149C276C08902AFE008A9EFC /* Build configuration list for PBXAggregateTarget "All" */;
 			buildPhases = (
+				5DF7E1CC188E6B87003F9A46 /* Copy jsc into _javascript_Core.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/_javascript_Core/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)/_javascript_Core.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 _javascript_Core.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/_javascript_Core.framework/Resources/jsc\"\ninstall_name_tool -change \"${BUILT_PRODUCTS_DIR}/_javascript_Core.framework/Versions/A/_javascript_Core\" \"@loader_path/../_javascript_Core\" \"${BUILT_PRODUCTS_DIR}/_javascript_Core.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 _javascript_Core.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 _javascript_Core.framework";
 			outputPaths = (
-				"$(DSTROOT)$(INSTALL_PATH)/testapi.js",
+				"$(BUILT_PRODUCTS_DIR)/$(_javascript_CORE_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 _javascript_Core.framework relative to its location.\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/${_javascript_CORE_RESOURCES_DIR}/jsc\"\ninstall_name_tool -change \"${_javascript_CORE_FRAMEWORKS_DIR}/_javascript_Core.framework/Versions/A/_javascript_Core\" \"@loader_path/../_javascript_Core\" \"${BUILT_PRODUCTS_DIR}/${_javascript_CORE_RESOURCES_DIR}/jsc\"\n";
 		};
 		65FB3F6509D11E9100F49DEB /* Generate Derived Sources */ = {
 			isa = PBXShellScriptBuildPhase;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to