Move jsc from Resources to Helpers
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Nov 2019 21:47:59 +0000 (21:47 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Nov 2019 21:47:59 +0000 (21:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203970
<rdar://problem/55917748>

Reviewed by Keith Miller.

'jsc' is a supporting application or tool, not a resource. As such, it
should go into Helpers, per
<https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG201>

Source/JavaScriptCore:

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

Tools:

* Scripts/run-jsc-stress-tests:
* Scripts/run-layout-jsc:
* Scripts/sunspider-compare-results:
(pathToSystemJSC):
* Scripts/test262/Runner.pm:
(getBuildPath):
* Scripts/webkitdirs.pm:
(jscPath):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/Base.xcconfig
Source/JavaScriptCore/Configurations/JSC.xcconfig
Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/Scripts/run-jsc-stress-tests
Tools/Scripts/run-layout-jsc
Tools/Scripts/sunspider-compare-results
Tools/Scripts/test262/Runner.pm
Tools/Scripts/webkitdirs.pm

index 0dec5b0..9c1558c 100644 (file)
@@ -1,3 +1,20 @@
+2019-11-18  Keith Rollin  <krollin@apple.com>
+
+        Move jsc from Resources to Helpers
+        https://bugs.webkit.org/show_bug.cgi?id=203970
+        <rdar://problem/55917748>
+
+        Reviewed by Keith Miller.
+
+        'jsc' is a supporting application or tool, not a resource. As such, it
+        should go into Helpers, per
+        <https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG201>
+
+        * Configurations/Base.xcconfig:
+        * Configurations/JSC.xcconfig:
+        * Configurations/ToolExecutable.xcconfig:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+
 2019-11-18  Keith Miller  <keith_miller@apple.com>
 
         Enable Nullish operators by default
index 00dcece..5e210ce 100644 (file)
@@ -127,7 +127,7 @@ JAVASCRIPTCORE_FRAMEWORKS_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FR
 JAVASCRIPTCORE_CONTENTS_DIR[sdk=iphone*] = JavaScriptCore.framework;
 JAVASCRIPTCORE_CONTENTS_DIR[sdk=macosx*] = JavaScriptCore.framework/Versions/A;
 
-JAVASCRIPTCORE_RESOURCES_DIR = $(JAVASCRIPTCORE_CONTENTS_DIR)/Resources;
+JAVASCRIPTCORE_HELPERS_DIR = $(JAVASCRIPTCORE_CONTENTS_DIR)/Helpers;
 JAVASCRIPTCORE_LIBRARIES_DIR = $(JAVASCRIPTCORE_CONTENTS_DIR)/Libraries;
 
 // DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
index 6634405..4940ffc 100644 (file)
@@ -24,7 +24,7 @@
 #include "FeatureDefines.xcconfig"
 #include "Version.xcconfig"
 
-INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/$(JAVASCRIPTCORE_RESOURCES_DIR);
+INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/$(JAVASCRIPTCORE_HELPERS_DIR);
 
 OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS);
 WK_RELOCATABLE_FRAMEWORKS_LDFLAGS = $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_$(WK_RELOCATABLE_FRAMEWORKS));
index 05e99e5..2c5d5ef 100644 (file)
@@ -25,7 +25,7 @@
 #include "FeatureDefines.xcconfig"
 #include "Version.xcconfig"
 
-INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/$(JAVASCRIPTCORE_RESOURCES_DIR);
+INSTALL_PATH = $(JAVASCRIPTCORE_FRAMEWORKS_DIR)/$(JAVASCRIPTCORE_HELPERS_DIR);
 PRODUCT_NAME = $(TARGET_NAME);
 
 USE_INTERNAL_SDK = $(USE_INTERNAL_SDK_$(CONFIGURATION));
index 0038eb7..11091a6 100644 (file)
                        buildConfigurationList = 149C276C08902AFE008A9EFC /* Build configuration list for PBXAggregateTarget "All" */;
                        buildPhases = (
                                5DF7E1CC188E6B87003F9A46 /* Copy jsc into JavaScriptCore.framework */,
+                               539966E3237CD6740033B0D2 /* Create Versions/Current/Helpers symlink */,
                        );
                        dependencies = (
                                932F5BE70822A1C700736975 /* PBXTargetDependency */,
                        shellPath = /bin/sh;
                        shellScript = "rsync -r ${SRCROOT}/API/tests/testapiScripts ${BUILT_PRODUCTS_DIR}\n";
                };
+               539966E3237CD6740033B0D2 /* Create Versions/Current/Helpers symlink */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputFileListPaths = (
+                       );
+                       inputPaths = (
+                       );
+                       name = "Create Versions/Current/Helpers symlink";
+                       outputFileListPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "# If on a deep-bundle system, set up a link from Helpers to Versions/A/Helpers\n\nif [[ \"${JAVASCRIPTCORE_HELPERS_DIR}\" =~ \"Versions\" ]]; then\n    if [[ \"${DEPLOYMENT_LOCATION}\" == \"NO\" ]]; then\n        ln -fhs Versions/Current/Helpers \"${BUILT_PRODUCTS_DIR}/${JAVASCRIPTCORE_HELPERS_DIR}/../../..\"\n    else\n        ln -fhs Versions/Current/Helpers \"${INSTALL_DIR}/../../..\"\n    fi\nfi\nexit 0\n";
+               };
                53B4BD091F68AF8900D2BEA3 /* Generate Unified Sources */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        name = "Copy jsc into JavaScriptCore.framework";
                        outputPaths = (
-                               "$(BUILT_PRODUCTS_DIR)/$(JAVASCRIPTCORE_RESOURCES_DIR)/jsc",
+                               "$(BUILT_PRODUCTS_DIR)/$(JAVASCRIPTCORE_HELPERS_DIR)/jsc",
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "set -e\n\n# 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";
+                       shellScript = "set -e\n\n# 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.\nmkdir -p \"${BUILT_PRODUCTS_DIR}/${JAVASCRIPTCORE_HELPERS_DIR}\"\nditto \"${BUILT_PRODUCTS_DIR}/jsc\" \"${BUILT_PRODUCTS_DIR}/${JAVASCRIPTCORE_HELPERS_DIR}/jsc\"\ninstall_name_tool -change \"${JAVASCRIPTCORE_FRAMEWORKS_DIR}/JavaScriptCore.framework/Versions/A/JavaScriptCore\" \"@loader_path/../JavaScriptCore\" \"${BUILT_PRODUCTS_DIR}/${JAVASCRIPTCORE_HELPERS_DIR}/jsc\"\n";
                };
                65788AA018B409EB00C189FF /* Offline Assemble */ = {
                        isa = PBXShellScriptBuildPhase;
index 588c2b6..b02be38 100644 (file)
@@ -1,3 +1,24 @@
+2019-11-18  Keith Rollin  <krollin@apple.com>
+
+        Move jsc from Resources to Helpers
+        https://bugs.webkit.org/show_bug.cgi?id=203970
+        <rdar://problem/55917748>
+
+        Reviewed by Keith Miller.
+
+        'jsc' is a supporting application or tool, not a resource. As such, it
+        should go into Helpers, per
+        <https://developer.apple.com/library/archive/technotes/tn2206/_index.html#//apple_ref/doc/uid/DTS40007919-CH1-TNTAG201>
+
+        * Scripts/run-jsc-stress-tests:
+        * Scripts/run-layout-jsc:
+        * Scripts/sunspider-compare-results:
+        (pathToSystemJSC):
+        * Scripts/test262/Runner.pm:
+        (getBuildPath):
+        * Scripts/webkitdirs.pm:
+        (jscPath):
+
 2019-11-18  Jonathan Bedard  <jbedard@apple.com>
 
         Python 3: Add support in webkitpy.layout_tests.views
index c030ce0..0011889 100755 (executable)
@@ -306,7 +306,7 @@ unless jscArg
 
     output = output[0]
     jscArg = Pathname.new(output).join("jsc")
-    jscArg = Pathname.new(output).join("JavaScriptCore.framework", "Resources", "jsc") if !File.file?(jscArg)
+    jscArg = Pathname.new(output).join("JavaScriptCore.framework", "Helpers", "jsc") if !File.file?(jscArg)
     jscArg = Pathname.new(output).join("bin", "jsc") if !File.file?(jscArg) # Support CMake build.
     if !File.file?(jscArg)
         $stderr.puts "Error: must specify --jsc <path>"
@@ -325,7 +325,7 @@ end
 $progressMeter = ($verbosity == 0 and $stdout.tty? and $remoteHosts.length <= 1)
 
 if $bundle
-    $jscPath = $bundle + ".vm" + "JavaScriptCore.framework" + "Resources" + "jsc"
+    $jscPath = $bundle + ".vm" + "JavaScriptCore.framework" + "Helpers" + "jsc"
     $outputDir = $bundle
 end
 
@@ -1740,7 +1740,7 @@ def prepareBundle
         
         frameworkPath = frameworkFromJSCPath($jscPath)
         destinationFrameworkPath = Pathname.new(".vm") + "JavaScriptCore.framework"
-        $jscPath = destinationFrameworkPath + "Resources" + "jsc"
+        $jscPath = destinationFrameworkPath + "Helpers" + "jsc"
         $testingFrameworkPath = Pathname.new("..") + destinationFrameworkPath
 
         if frameworkPath
index 5ab597c..01f34be 100755 (executable)
@@ -25,7 +25,7 @@
 
 # Script to run selected LayoutTests/{js,fast/regex} tests using jsc
 
-jscCmd="/System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc"
+jscCmd="/System/Library/Frameworks/JavaScriptCore.framework/Helpers/jsc"
 testRoot=/tmp/LayoutTests
 resultsRoot=`date \+/tmp/results-%Y-%m-%d-%H-%M-%S`
 
index 5f79ccb..604ff4e 100755 (executable)
@@ -98,7 +98,7 @@ sub pathToBuiltJSC($)
 
 sub pathToSystemJSC()
 {
-    my $path = "/System/Library/Frameworks/JavaScriptCore.framework/Resources/jsc";
+    my $path = "/System/Library/Frameworks/JavaScriptCore.framework/Helpers/jsc";
     if (-f $path) {
         return $path;
     }
index 81adb15..265c983 100755 (executable)
@@ -601,7 +601,7 @@ sub getBuildPath {
         my $jscDir = executableProductDir();
 
         $jsc = $jscDir . '/jsc';
-        $jsc = $jscDir . '/JavaScriptCore.framework/Resources/jsc' if (! -e $jsc);
+        $jsc = $jscDir . '/JavaScriptCore.framework/Helpers/jsc' if (! -e $jsc);
         $jsc = $jscDir . '/bin/jsc' if (! -e $jsc);
 
         # Sets the Env DYLD_FRAMEWORK_PATH, abs_path will remove any extra '/' character
index 37264f7..fc74e63 100755 (executable)
@@ -476,7 +476,7 @@ sub jscPath($)
         $jscName .= ".exe";
     }
     return "$productDir/$jscName" if -e "$productDir/$jscName";
-    return "$productDir/JavaScriptCore.framework/Resources/$jscName";
+    return "$productDir/JavaScriptCore.framework/Helpers/$jscName";
 }
 
 sub argumentsForConfiguration()