Title: [288710] trunk/Source
Revision
288710
Author
msab...@apple.com
Date
2022-01-27 16:24:20 -0800 (Thu, 27 Jan 2022)

Log Message

com.apple.WebKit.WebAuthn.xpc fails to build with system content path
https://bugs.webkit.org/show_bug.cgi?id=235734

Reviewed by Filip Pizlo.

Source/_javascript_Core:

Adjusted build path variables to handle the case when building for Catalyst.
Did this by refactoring how the optional system content path is added as a prefix to paths.
As a result, modified the create symlink script to not be dependent on the target location,
since it isn't created when doing a catalyst build.  Instead the script creates the parent
directory of the symlink if it doesn't exisst.

* Configurations/Base.xcconfig:
* Configurations/JSC.xcconfig:
* Configurations/_javascript_Core.xcconfig:
* _javascript_Core.xcodeproj/project.pbxproj:
* Scripts/create-symlink-to-altroot.sh:

Source/ThirdParty/libwebrtc:

Added explicit  PUBLIC_HEADERS_FOLDER_PATH vavriable.  Otherwise we get the
project version with didn't include the "libwebrtc" component.

* Configurations/libwebrtc.xcconfig:

Source/WebCore:

Since WebCore is installed under the WebKit framework on macOS, we don't need a symlink for the
WebCore.framework itself.  As a result, modified the create symlink script to not be dependent
on the target location, since it isn't created when doing a catalyst build.
Instead the script creates the parent directory of the symlink if it doesn't exisst.

* Configurations/WebCore.xcconfig:
* Scripts/create-symlink-to-altroot.sh:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

Since we symlink the the whole framework when building the main "WebKit" target,
we can eliminate the create symlink script for the WebAuth target.
Eliminated the setting of ALTERNATE_ROOT_PATH build variables for all XPC services.

* Configurations/BaseXPCService.xcconfig:
* WebKit.xcodeproj/project.pbxproj:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (288709 => 288710)


--- trunk/Source/_javascript_Core/ChangeLog	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/_javascript_Core/ChangeLog	2022-01-28 00:24:20 UTC (rev 288710)
@@ -1,3 +1,22 @@
+2022-01-27  Michael Saboff  <msab...@apple.com>
+
+        com.apple.WebKit.WebAuthn.xpc fails to build with system content path
+        https://bugs.webkit.org/show_bug.cgi?id=235734
+
+        Reviewed by Filip Pizlo.
+
+        Adjusted build path variables to handle the case when building for Catalyst.
+        Did this by refactoring how the optional system content path is added as a prefix to paths.
+        As a result, modified the create symlink script to not be dependent on the target location,
+        since it isn't created when doing a catalyst build.  Instead the script creates the parent
+        directory of the symlink if it doesn't exisst.
+
+        * Configurations/Base.xcconfig:
+        * Configurations/JSC.xcconfig:
+        * Configurations/_javascript_Core.xcconfig:
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        * Scripts/create-symlink-to-altroot.sh:
+
 2022-01-27  Gavin Phillips  <gavi...@apple.com>
 
         Check the process has the dynamic-codesigning entitlement before trying to allocate a holding JIT region

Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (288709 => 288710)


--- trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2022-01-28 00:24:20 UTC (rev 288710)
@@ -31,6 +31,9 @@
 USE_INTERNAL_SDK_Debug = $(HAVE_INTERNAL_SDK);
 USE_INTERNAL_SDK_Release = $(HAVE_INTERNAL_SDK);
 
+INSTALL_PATH_PREFIX = $(INSTALL_PATH_PREFIX_$(USE_SYSTEM_CONTENT_PATH));
+INSTALL_PATH_PREFIX_YES = $(SYSTEM_CONTENT_PATH);
+
 ALWAYS_SEARCH_USER_PATHS = NO;
 
 CLANG_CXX_LANGUAGE_STANDARD = c++2a;
@@ -163,8 +166,6 @@
 WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_NO = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
 WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(WK_INSTALL_PATH_PREFIX)$(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
 WK_OVERRIDE_FRAMEWORKS_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_YES = $(WK_ALTERNATE_FRAMEWORKS_DIR)/System/Library/Frameworks;
-WK_OVERRIDE_FRAMEWORKS_DIR_USE_ALTERNATE_FRAMEWORKS_DIR_NO = $(WK_OVERRIDE_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_$(USE_SYSTEM_CONTENT_PATH));
-WK_OVERRIDE_FRAMEWORKS_DIR_USE_SYSTEM_CONTENT_PATH_YES = $(SYSTEM_CONTENT_PATH)/System/Library/Frameworks;
 
 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_YES = "$(WK_OVERRIDE_FRAMEWORKS_DIR)";

Modified: trunk/Source/_javascript_Core/Configurations/JSC.xcconfig (288709 => 288710)


--- trunk/Source/_javascript_Core/Configurations/JSC.xcconfig	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/_javascript_Core/Configurations/JSC.xcconfig	2022-01-28 00:24:20 UTC (rev 288710)
@@ -23,7 +23,7 @@
 
 #include "Version.xcconfig"
 
-INSTALL_PATH = $(_javascript_CORE_FRAMEWORKS_DIR)/$(_javascript_CORE_HELPERS_DIR);
+INSTALL_PATH = $(INSTALL_PATH_PREFIX)$(_javascript_CORE_FRAMEWORKS_DIR)/$(_javascript_CORE_HELPERS_DIR);
 
 OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS);
 WK_RELOCATABLE_FRAMEWORKS_LDFLAGS = $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS_$(WK_RELOCATABLE_FRAMEWORKS));

Modified: trunk/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig (288709 => 288710)


--- trunk/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/_javascript_Core/Configurations/_javascript_Core.xcconfig	2022-01-28 00:24:20 UTC (rev 288710)
@@ -43,7 +43,7 @@
 OTHER_CPLUSPLUSFLAGS = $(inherited) -fno-slp-vectorize --system-header-prefix=unicode/;
 HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/_javascript_Core" $(HEADER_SEARCH_PATHS);
 INFOPLIST_FILE = Info.plist;
-INSTALL_PATH = $(_javascript_CORE_FRAMEWORKS_DIR);
+INSTALL_PATH = $(INSTALL_PATH_PREFIX)$(_javascript_CORE_FRAMEWORKS_DIR);
 DYLIB_INSTALL_NAME_BASE = $(DYLIB_INSTALL_NAME_BASE_$(WK_USE_ALTERNATE_FRAMEWORKS_DIR));
 DYLIB_INSTALL_NAME_BASE_NO = $(NORMAL_JAVASCRIPTCORE_FRAMEWORKS_DIR)
 DYLIB_INSTALL_NAME_BASE_YES = $(DYLIB_INSTALL_NAME_BASE);
@@ -50,7 +50,7 @@
 PRODUCT_NAME = _javascript_Core;
 PRODUCT_BUNDLE_IDENTIFIER = com.apple.$(PRODUCT_NAME:rfc1034identifier);
 
-ALTERNATE_ROOT_PATH = $(DYLIB_INSTALL_NAME_BASE);
+ALTERNATE_ROOT_PATH = $(_javascript_CORE_FRAMEWORKS_DIR);
 
 OUTPUT_ALTERNATE_ROOT_PATH = $(OUTPUT_ALTERNATE_ROOT_PATH_$(USE_SYSTEM_CONTENT_PATH));
 OUTPUT_ALTERNATE_ROOT_PATH_YES = $(DSTROOT)$(ALTERNATE_ROOT_PATH)/$(FULL_PRODUCT_NAME);

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (288709 => 288710)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2022-01-28 00:24:20 UTC (rev 288710)
@@ -11905,7 +11905,6 @@
 			outputFileListPaths = (
 			);
 			outputPaths = (
-				"${OUTPUT_ALTERNATE_ROOT_PATH}",
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/zsh;

Modified: trunk/Source/_javascript_Core/Scripts/create-symlink-to-altroot.sh (288709 => 288710)


--- trunk/Source/_javascript_Core/Scripts/create-symlink-to-altroot.sh	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/_javascript_Core/Scripts/create-symlink-to-altroot.sh	2022-01-28 00:24:20 UTC (rev 288710)
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/bin/sh
 
 set -e
 
@@ -14,6 +14,12 @@
 RELATIVE_PATH_FROM_SYMLINK_TO_ROOT=$(echo "${ALTERNATE_ROOT_PATH}" | sed -E -e "s/\/[a-zA-Z0-9_]+/..\//g" -e "s/\/$//")
 SYMLINK_VALUE="${RELATIVE_PATH_FROM_SYMLINK_TO_ROOT}${INSTALL_PATH}/${FULL_PRODUCT_NAME}"
 
+OUTPUT_ALTERNATE_ROOT_DIR=`dirname ${OUTPUT_ALTERNATE_ROOT_PATH}`
+
+if [[ ! -d ${OUTPUT_ALTERNATE_ROOT_DIR} ]]; then
+    mkdir -p ${OUTPUT_ALTERNATE_ROOT_DIR}
+fi
+
 if [[ -L "${OUTPUT_ALTERNATE_ROOT_PATH}" ]]; then
     EXISTING_SYMLINK_VALUE=$(readlink "${OUTPUT_ALTERNATE_ROOT_PATH}")
 

Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (288709 => 288710)


--- trunk/Source/ThirdParty/libwebrtc/ChangeLog	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog	2022-01-28 00:24:20 UTC (rev 288710)
@@ -1,3 +1,15 @@
+2022-01-27  Michael Saboff  <msab...@apple.com>
+
+        com.apple.WebKit.WebAuthn.xpc fails to build with system content path
+        https://bugs.webkit.org/show_bug.cgi?id=235734
+
+        Reviewed by Filip Pizlo.
+
+        Added explicit  PUBLIC_HEADERS_FOLDER_PATH vavriable.  Otherwise we get the
+        project version with didn't include the "libwebrtc" component.
+
+        * Configurations/libwebrtc.xcconfig:
+
 2022-01-25  Michael Saboff  <msab...@apple.com>
 
         Install build failure when using SYSTEM_CONTENT_PATH

Modified: trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig (288709 => 288710)


--- trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig	2022-01-28 00:24:20 UTC (rev 288710)
@@ -62,6 +62,8 @@
 
 CREATE_SYMLINK_OUTPUT_FILES = ${SYSTEM_PUBLIC_HEADER_PREFIX}  ${SYSTEM_PUBLIC_LIBRARY_PREFIX};
 
+PUBLIC_HEADERS_FOLDER_PATH = ${PUBLIC_HEADERS_FOLDER_PREFIX}/libwebrtc;
+
 USE_HEADERMAP = NO;
 INSTALLHDRS_SCRIPT_PHASE = YES;
 WARNING_CFLAGS = -Wno-deprecated-declarations $(inherited);

Modified: trunk/Source/WebCore/ChangeLog (288709 => 288710)


--- trunk/Source/WebCore/ChangeLog	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebCore/ChangeLog	2022-01-28 00:24:20 UTC (rev 288710)
@@ -1,3 +1,19 @@
+2022-01-27  Michael Saboff  <msab...@apple.com>
+
+        com.apple.WebKit.WebAuthn.xpc fails to build with system content path
+        https://bugs.webkit.org/show_bug.cgi?id=235734
+
+        Reviewed by Filip Pizlo.
+
+        Since WebCore is installed under the WebKit framework on macOS, we don't need a symlink for the
+        WebCore.framework itself.  As a result, modified the create symlink script to not be dependent
+        on the target location, since it isn't created when doing a catalyst build.
+        Instead the script creates the parent directory of the symlink if it doesn't exisst.
+
+        * Configurations/WebCore.xcconfig:
+        * Scripts/create-symlink-to-altroot.sh:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2022-01-27  Chris Dumez  <cdu...@apple.com>
 
         Geolocation API should callback with error if doc is not fully active

Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (288709 => 288710)


--- trunk/Source/WebCore/Configurations/WebCore.xcconfig	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig	2022-01-28 00:24:20 UTC (rev 288710)
@@ -75,7 +75,6 @@
 UNEXPORTED_SYMBOLS_FILE = Configurations/WebCore.unexp;
 
 ALTERNATE_ROOT_PATH[sdk=iphone*] = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
-ALTERNATE_ROOT_PATH[sdk=macosx*] = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
 
 OUTPUT_ALTERNATE_ROOT_PATH[sdk=iphone*] = $(OUTPUT_ALTERNATE_ROOT_PATH_$(USE_SYSTEM_CONTENT_PATH));
 OUTPUT_ALTERNATE_ROOT_PATH_YES[sdk=iphone*] = $(DSTROOT)$(ALTERNATE_ROOT_PATH)/$(FULL_PRODUCT_NAME);

Modified: trunk/Source/WebCore/Scripts/create-symlink-to-altroot.sh (288709 => 288710)


--- trunk/Source/WebCore/Scripts/create-symlink-to-altroot.sh	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebCore/Scripts/create-symlink-to-altroot.sh	2022-01-28 00:24:20 UTC (rev 288710)
@@ -1,4 +1,4 @@
-#!/bin/zsh
+#!/bin/sh
 
 set -e
 
@@ -14,6 +14,12 @@
 RELATIVE_PATH_FROM_SYMLINK_TO_ROOT=$(echo "${ALTERNATE_ROOT_PATH}" | sed -E -e "s/\/[a-zA-Z0-9_]+/..\//g" -e "s/\/$//")
 SYMLINK_VALUE="${RELATIVE_PATH_FROM_SYMLINK_TO_ROOT}${INSTALL_PATH}/${FULL_PRODUCT_NAME}"
 
+OUTPUT_ALTERNATE_ROOT_DIR=`dirname ${OUTPUT_ALTERNATE_ROOT_PATH}`
+
+if [[ ! -d ${OUTPUT_ALTERNATE_ROOT_DIR} ]]; then
+    mkdir -p ${OUTPUT_ALTERNATE_ROOT_DIR}
+fi
+
 if [[ -L "${OUTPUT_ALTERNATE_ROOT_PATH}" ]]; then
     EXISTING_SYMLINK_VALUE=$(readlink "${OUTPUT_ALTERNATE_ROOT_PATH}")
 

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (288709 => 288710)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2022-01-28 00:24:20 UTC (rev 288710)
@@ -38470,7 +38470,6 @@
 			outputFileListPaths = (
 			);
 			outputPaths = (
-				"${OUTPUT_ALTERNATE_ROOT_PATH}",
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/zsh;

Modified: trunk/Source/WebKit/ChangeLog (288709 => 288710)


--- trunk/Source/WebKit/ChangeLog	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebKit/ChangeLog	2022-01-28 00:24:20 UTC (rev 288710)
@@ -1,3 +1,17 @@
+2022-01-27  Michael Saboff  <msab...@apple.com>
+
+        com.apple.WebKit.WebAuthn.xpc fails to build with system content path
+        https://bugs.webkit.org/show_bug.cgi?id=235734
+
+        Reviewed by Filip Pizlo.
+
+        Since we symlink the the whole framework when building the main "WebKit" target,
+        we can eliminate the create symlink script for the WebAuth target.
+        Eliminated the setting of ALTERNATE_ROOT_PATH build variables for all XPC services.
+
+        * Configurations/BaseXPCService.xcconfig:
+        * WebKit.xcodeproj/project.pbxproj:
+
 2022-01-27  Kate Cheney  <katherine_che...@apple.com>
 
         "Unrecognized Content-Security-Policy directive 'worker-src'."

Modified: trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig (288709 => 288710)


--- trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig	2022-01-28 00:24:20 UTC (rev 288710)
@@ -31,11 +31,6 @@
 
 INSTALL_PATH = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/$(WK_FRAMEWORK_VERSION_PREFIX)XPCServices;
 
-ALTERNATE_ROOT_PATH = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/XPCServices;
-
-OUTPUT_ALTERNATE_ROOT_PATH = $(OUTPUT_ALTERNATE_ROOT_PATH_$(USE_SYSTEM_CONTENT_PATH));
-OUTPUT_ALTERNATE_ROOT_PATH_YES = $(DSTROOT)$(ALTERNATE_ROOT_PATH)/$(FULL_PRODUCT_NAME);
-
 APP_ICON = $(APP_ICON_$(CONFIGURATION));
 APP_ICON_Debug = WebKit.icns;
 APP_ICON_Release = WebKit.icns;

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (288709 => 288710)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-01-28 00:01:39 UTC (rev 288709)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-01-28 00:24:20 UTC (rev 288710)
@@ -14142,7 +14142,6 @@
 				5742A2F02535613F00B7BA14 /* Resources */,
 				5742A2F12535613F00B7BA14 /* Unlock keychain */,
 				5742A2F22535613F00B7BA14 /* Process WebAuthentication entitlements */,
-				6577FFC02769C7700011AEC8 /* Create Symlink to Alt Root Path */,
 			);
 			buildRules = (
 			);
@@ -14960,6 +14959,7 @@
 			outputFileListPaths = (
 			);
 			outputPaths = (
+				"${OUTPUT_ALTERNATE_ROOT_PATH}",
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/zsh;
@@ -15055,24 +15055,6 @@
 			shellPath = /bin/zsh;
 			shellScript = "\"${SRCROOT}/Scripts/create-symlink-to-altroot.sh\"\n";
 		};
-		6577FFC02769C7700011AEC8 /* Create Symlink to Alt Root Path */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 8;
-			files = (
-			);
-			inputFileListPaths = (
-			);
-			inputPaths = (
-			);
-			name = "Create Symlink to Alt Root Path";
-			outputFileListPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-			shellPath = /bin/zsh;
-			shellScript = "\"${SRCROOT}/Scripts/create-symlink-to-altroot.sh\"\n";
-		};
 		7A7E8DF22748392500DCC97A /* Process WebContent entitlements */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to