Modified: trunk/Source/WebKit/ChangeLog (282445 => 282446)
--- trunk/Source/WebKit/ChangeLog 2021-09-15 09:11:51 UTC (rev 282445)
+++ trunk/Source/WebKit/ChangeLog 2021-09-15 09:53:27 UTC (rev 282446)
@@ -1,3 +1,17 @@
+2021-09-15 Tim Horton <[email protected]>
+
+ Remove the "Replace WebKitAdditions in Framework Headers" build phase
+ https://bugs.webkit.org/show_bug.cgi?id=230300
+
+ Reviewed by Wenson Hsieh.
+
+ * WebKit.xcodeproj/project.pbxproj:
+ * mac/replace-webkit-additions-includes.py: Removed.
+ As Wenson pointed out in bug 230198, this build phase is currently unused.
+ It's also wasting a quarter of the WebKit-only null build time, so let's
+ just remove it and hope we never need it again (but if we do, it's in the history!).
+ This gets us down to 11 seconds on the same benchmark mentioned in r282367.
+
2021-09-14 Don Olmstead <[email protected]>
Non-unified build fixes, mid September 2021 edition
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (282445 => 282446)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2021-09-15 09:11:51 UTC (rev 282445)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2021-09-15 09:53:27 UTC (rev 282446)
@@ -13412,7 +13412,6 @@
1A6280C81919956B006AD9F9 /* Migrate WebKitLegacy Headers */,
375A248817E5048E00C9A086 /* Postprocess WKBase.h */,
1AD98ECF191D867300CAA6DF /* Postprocess WKFoundation.h */,
- F4EFBAD522540CBB00049BA6 /* Replace WebKitAdditions in Framework Headers */,
1A1D2115191D96380001619F /* Postprocess Framework Headers */,
2E16B6F42019BC25008996D6 /* Copy Additional Resources */,
8DC2EF520486A6940098B216 /* Resources */,
@@ -14250,20 +14249,6 @@
shellPath = /bin/sh;
shellScript = "echo \"Preprocessing sandbox\"\nScripts/generate-derived-sources.sh sandbox-profiles-ios\ncp ${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2/com.apple.WebKit.WebContent.sb ${DSTROOT}/${INSTALL_PATH}\n";
};
- F4EFBAD522540CBB00049BA6 /* Replace WebKitAdditions in Framework Headers */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Replace WebKitAdditions in Framework Headers";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "if [ \"${XCODE_VERSION_ACTUAL}\" -ge \"1140\" -a \"${WK_USE_NEW_BUILD_SYSTEM}\" = \"YES\" ]; then\n # In this configuration, post-processing is performed at the same time as copying in the postprocess-header-rule script, so there's no need for this separate step.\n exit 0\nfi\n\nif [ \"${ACTION}\" = \"analyze\" -o \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n for HEADERS_DIRECTORY in \"${PUBLIC_HEADERS_FOLDER_PATH}\" \"${PRIVATE_HEADERS_FOLDER_PATH}\"; do\n for HEADER_PATH in \"${TARGET_BUILD_DIR}/${HEADERS_DIRECTORY}/\"*.*; do\n if [[ ! -z `grep '#import <WebKitAdditions/.*>' \"${HEADER_PATH}\"` ]]; then\n python \"${SRCROOT}/mac/replace-webk
it-additions-includes.py\" \"${HEADER_PATH}\" \"${BUILT_PRODUCTS_DIR}\" \"${SDKROOT}\" || exit $?\n fi\n done\n done\nfi\n\n\n";
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
Deleted: trunk/Source/WebKit/mac/replace-webkit-additions-includes.py (282445 => 282446)
--- trunk/Source/WebKit/mac/replace-webkit-additions-includes.py 2021-09-15 09:11:51 UTC (rev 282445)
+++ trunk/Source/WebKit/mac/replace-webkit-additions-includes.py 2021-09-15 09:53:27 UTC (rev 282446)
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2019 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-# THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-import os
-import re
-import sys
-
-
-def read_content_from_webkit_additions(built_products_directory, sdk_root_directory, filename):
- additions_path = os.path.join("usr/local/include/WebKitAdditions", filename)
- try:
- file_in_build_directory = open(os.path.join(built_products_directory, additions_path), "r")
- return file_in_build_directory.read()
- except:
- try:
- file_in_sdk_root = open(os.path.join(sdk_root_directory, additions_path), "r")
- return file_in_sdk_root.read()
- except:
- return ""
-
-
-def main(argv=None):
- if not argv:
- argv = sys.argv
-
- if len(argv) != 4:
- print("Usage: replace-webkit-additions-includes.py <header_path> <built_products_directory> <sdk_root_directory>")
- return 1
-
- header_path = argv[1]
- built_products_directory = argv[2]
- sdk_root_directory = argv[3]
- if not len(header_path):
- print("(%s): header path unspecified" % argv[0])
- return 1
-
- if not len(built_products_directory):
- print("(%s): built products directory unspecified" % argv[0])
- return 1
-
- if not len(sdk_root_directory):
- print("(%s): SDK root directory unspecified" % argv[0])
- return 1
-
- additions_import_pattern = re.compile(r"\#if USE\(APPLE_INTERNAL_SDK\)\n#import <WebKitAdditions/(.*)>\n#endif")
- try:
- with open(header_path, "r") as header:
- header_contents = header.read()
- match = additions_import_pattern.search(header_contents)
- while match:
- header_contents = header_contents[:match.start()] + read_content_from_webkit_additions(built_products_directory, sdk_root_directory, match.groups()[0]) + header_contents[match.end():]
- match = additions_import_pattern.search(header_contents)
- try:
- with open(header_path, "w") as header:
- header.write(header_contents)
- except:
- print("(%s): failed to write to file: %s" % (argv[0], header_path))
- return 1
- return 0
- except:
- print("(%s): failed to read file: %s" % (argv[0], header_path))
- return 1
-
-if __name__ == "__main__":
- sys.exit(main(sys.argv))