From 1648743a8354fe8a4985df6b64c92dacae686446 Mon Sep 17 00:00:00 2001 From: Elliott Williams Date: Mon, 25 Jul 2022 12:05:50 -0700 Subject: [PATCH] [Make] Use workspace builds by default https://bugs.webkit.org/show_bug.cgi?id=242625 Reviewed by Alexey Proskuryakov. Use the currently-selected workspace [1] for Make-based builds. This improves build performance as it has in other build workflows, by doing a parallel scheme-based build instead of building each project sequentially. The old, manually ordered build workflow can be used by passing USE_WORKSPACE=NO to Make. * Makefile: USE_WORKSPACE enabled by default. * Makefile.shared: USE_WORKSPACE enabled by default. Avoid checking the value of USE_WORKSPACE when deciding whether to print a scheme vs. a project name. * Source/Makefile: USE_WORKSPACE enabled by default. * Source/bmalloc/bmalloc.xcodeproj/xcshareddata/xcschemes/bmalloc.xcscheme: Added. Needed so that Source/bmalloc can be built via the workspace. * Tools/Makefile: USE_WORKSPACE enabled by default. MobileMiniBrowser was being built by `make -C Tools`, but was never added to the "All Tools" scheme. Add an aggregate which builds MobileMiniBrowser, but only during iOS builds (like we did for MiniBrowser and Mac in https://commits.webkit.org/251501@main). * Tools/MobileMiniBrowser/Configurations/Base.xcconfig: Move SUPPORTED_PLATFORMS logic down to MobileMiniBrowser.xcconfig, so the aggregate target can use platform filtering. * Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig: * Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj: Add the new `MobileMiniBrowser (Platform filters)` target to the relevant schemes. * WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme: * WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: [1]: A workspace is selected automatically when making a "top-level" build, such as building the entire WebKit tree. Once a workspace is selected, single-projects builds (e.g. make -C Source/WebCore) use the same workspace, preserving incremental build data. This allows engineers building the internal tree to iterate on individual projects while still being able to make incremental workspace builds. See https://commits.webkit.org/252363@main for more information. Canonical link: https://commits.webkit.org/252794@main --- Makefile | 2 +- Makefile.shared | 6 +- Source/Makefile | 2 +- .../xcshareddata/xcschemes/bmalloc.xcscheme | 70 +++++++++++++++ Tools/Makefile | 4 +- .../Configurations/Base.xcconfig | 2 +- .../Configurations/MobileMiniBrowser.xcconfig | 2 +- .../project.pbxproj | 88 +++++++++++++++++-- .../xcschemes/All Modules.xcscheme | 14 +++ .../xcshareddata/xcschemes/All Tools.xcscheme | 14 +++ 10 files changed, 189 insertions(+), 15 deletions(-) create mode 100644 Source/bmalloc/bmalloc.xcodeproj/xcshareddata/xcschemes/bmalloc.xcscheme diff --git a/Makefile b/Makefile index d43026eba6ff3..6a586fc2b6eaa 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -ifeq ($(USE_WORKSPACE),YES) +ifneq ($(USE_WORKSPACE),NO) SCHEME = All Modules SCRIPTS_PATH = Tools/Scripts diff --git a/Makefile.shared b/Makefile.shared index 95d043cc6cbf7..2388eb045c303 100644 --- a/Makefile.shared +++ b/Makefile.shared @@ -1,6 +1,6 @@ SCRIPTS_PATH ?= ../Tools/Scripts -ifeq ($(USE_WORKSPACE),YES) +ifneq ($(USE_WORKSPACE),NO) SCHEME ?= $(notdir $(CURDIR)) XCODE_TARGET = -scheme "$(SCHEME)" @@ -12,9 +12,11 @@ endif # happen in the workspace. When this is only passed on the command line, it # invalidates build results made in the IDE (rdar://88135402). #XCODE_OPTIONS += WK_VALIDATE_DEPENDENCIES=YES_ERROR +BUILD_GOAL = $(SCHEME) else USE_WORKSPACE = BUILD_WEBKIT_OPTIONS += --no-use-workspace +BUILD_GOAL = $(notdir $(CURDIR)) endif @@ -125,7 +127,7 @@ endef define invoke_xcode ( \ echo; \ - echo "===== BUILDING $(if $(USE_WORKSPACE),$(SCHEME),$(notdir $(CURDIR))) ====="; \ + echo "===== BUILDING $(BUILD_GOAL) ====="; \ echo; \ $1 xcodebuild $2 $(OTHER_OPTIONS) $(XCODE_TARGET) $(XCODE_OPTIONS) $3 | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} \ ) diff --git a/Source/Makefile b/Source/Makefile index 074d7e18f70e4..3bfe0af3cb87c 100644 --- a/Source/Makefile +++ b/Source/Makefile @@ -1,4 +1,4 @@ -ifeq ($(USE_WORKSPACE),YES) +ifneq ($(USE_WORKSPACE),NO) include ../Makefile.shared SCHEME = All Source diff --git a/Source/bmalloc/bmalloc.xcodeproj/xcshareddata/xcschemes/bmalloc.xcscheme b/Source/bmalloc/bmalloc.xcodeproj/xcshareddata/xcschemes/bmalloc.xcscheme new file mode 100644 index 0000000000000..aa821a68214cc --- /dev/null +++ b/Source/bmalloc/bmalloc.xcodeproj/xcshareddata/xcschemes/bmalloc.xcscheme @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tools/Makefile b/Tools/Makefile index 4c941a79d813c..16ea962ff748e 100644 --- a/Tools/Makefile +++ b/Tools/Makefile @@ -1,4 +1,4 @@ -ifeq ($(USE_WORKSPACE),YES) +ifneq ($(USE_WORKSPACE),NO) include ../Makefile.shared SCHEME = All Tools @@ -61,4 +61,4 @@ clean: installsrc: @true -endif # USE_WORKSPACE \ No newline at end of file +endif # USE_WORKSPACE diff --git a/Tools/MobileMiniBrowser/Configurations/Base.xcconfig b/Tools/MobileMiniBrowser/Configurations/Base.xcconfig index 8bb38a1aedcae..0eb60fc7c57ab 100644 --- a/Tools/MobileMiniBrowser/Configurations/Base.xcconfig +++ b/Tools/MobileMiniBrowser/Configurations/Base.xcconfig @@ -82,7 +82,7 @@ MTL_ENABLE_DEBUG_INFO = NO; VALIDATE_PRODUCT = YES; WARNING_CFLAGS = -Wall -W -Wformat=2 -Wno-unused-parameter -Wundef; -SUPPORTED_PLATFORMS = iphoneos iphonesimulator; +SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator; SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK)); SDKROOT_ = macosx; SDKROOT_YES = macosx.internal; diff --git a/Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig b/Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig index 920aae5aaa84d..bf9eac9ecda3e 100644 --- a/Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig +++ b/Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig @@ -22,5 +22,5 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRODUCT_NAME = MiniBrowser - STRIP_STYLE=debugging +SUPPORTED_PLATFORMS = iphoneos iphonesimulator; diff --git a/Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj b/Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj index 126dfa80d8f1b..eeec0f933425b 100644 --- a/Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj +++ b/Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj @@ -3,9 +3,23 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { +/* Begin PBXAggregateTarget section */ + DD2A1D052888D1CB00342472 /* MobileMiniBrowser (Platform filters) */ = { + isa = PBXAggregateTarget; + buildConfigurationList = DD2A1D082888D1CB00342472 /* Build configuration list for PBXAggregateTarget "MobileMiniBrowser (Platform filters)" */; + buildPhases = ( + ); + dependencies = ( + DD2A1D0A2888D1D300342472 /* PBXTargetDependency */, + ); + name = "MobileMiniBrowser (Platform filters)"; + productName = "MiniBrowser (Platform filters)"; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ 3F0B439B1D908D0C00D186B5 /* looping2s.html in Resources */ = {isa = PBXBuildFile; fileRef = 3F0B439A1D908D0C00D186B5 /* looping2s.html */; }; 3F0B439D1D908DE700D186B5 /* test2s.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3F0B439C1D908DE700D186B5 /* test2s.mp4 */; }; @@ -44,6 +58,13 @@ remoteGlobalIDString = CD498B3A1D76348000681FA7; remoteInfo = MobileMiniBrowser; }; + DD2A1D092888D1D300342472 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = CD1DAF8A1D709E3600017CF0 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CD1DAF911D709E3600017CF0; + remoteInfo = MobileMiniBrowser; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -302,6 +323,9 @@ CreatedOnToolsVersion = 8.0; ProvisioningStyle = Automatic; }; + DD2A1D052888D1CB00342472 = { + CreatedOnToolsVersion = 13.3; + }; }; }; buildConfigurationList = CD1DAF8D1D709E3600017CF0 /* Build configuration list for PBXProject "MobileMiniBrowser" */; @@ -320,6 +344,7 @@ CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */, CD1DAFAA1D709E3600017CF0 /* MobileMiniBrowserUITests */, CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */, + DD2A1D052888D1CB00342472 /* MobileMiniBrowser (Platform filters) */, ); }; /* End PBXProject section */ @@ -396,6 +421,12 @@ target = CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */; targetProxy = CD498B401D76348000681FA7 /* PBXContainerItemProxy */; }; + DD2A1D0A2888D1D300342472 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + platformFilter = ios; + target = CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */; + targetProxy = DD2A1D092888D1D300342472 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -438,7 +469,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = MobileMiniBrowser/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser; PRODUCT_NAME = MobileMiniBrowser; TARGETED_DEVICE_FAMILY = "1,2"; @@ -451,7 +485,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = MobileMiniBrowser/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser; PRODUCT_NAME = MobileMiniBrowser; TARGETED_DEVICE_FAMILY = "1,2"; @@ -462,7 +499,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = MobileMiniBrowserUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = MobileMiniBrowser; @@ -473,7 +514,11 @@ isa = XCBuildConfiguration; buildSettings = { INFOPLIST_FILE = MobileMiniBrowserUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = MobileMiniBrowser; @@ -491,7 +536,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = MobileMiniBrowser/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework; PRODUCT_NAME = MobileMiniBrowser; SKIP_INSTALL = YES; @@ -511,7 +560,11 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = MobileMiniBrowser/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework; PRODUCT_NAME = MobileMiniBrowser; SKIP_INSTALL = YES; @@ -520,6 +573,18 @@ }; name = Release; }; + DD2A1D062888D1CB00342472 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Debug; + }; + DD2A1D072888D1CB00342472 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -559,6 +624,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + DD2A1D082888D1CB00342472 /* Build configuration list for PBXAggregateTarget "MobileMiniBrowser (Platform filters)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD2A1D062888D1CB00342472 /* Debug */, + DD2A1D072888D1CB00342472 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = CD1DAF8A1D709E3600017CF0 /* Project object */; diff --git a/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme b/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme index 0a7672a9d18fe..1e41cbcb9a7fa 100644 --- a/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme +++ b/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme @@ -188,6 +188,20 @@ ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj"> + + + + + + + +