- Revision
- 288316
- Author
- [email protected]
- Date
- 2022-01-20 13:11:04 -0800 (Thu, 20 Jan 2022)
Log Message
[XCBuild] Build via the workspace with USE_WORKSPACE=YES
https://bugs.webkit.org/show_bug.cgi?id=235385
rdar://87489695
Patch by Elliott Williams <[email protected]> on 2022-01-20
Reviewed by Alexey Proskuryakov.
.:
Experimental XCBuild support is available by passing USE_WORKSPACE=YES to Make. This is
roughly equivalent to opening WebKit.xcworkspace and building a scheme in the IDE.
A workspace build is only one `xcodebuild` invocation, in contrast with the traditional
recursive-Make build that iterates through each project directory. As a result, workspace
builds are faster: the build system can schedule targets from different projects to build
simultaneously, and there's lower xcodebuild overhead.
Workspaces build _schemes_, which are a collection of targets. By default, Make looks for a
scheme whose name matches the source directory (Source/WebCore => build scheme "WebCore").
Makefiles can customize this by setting SCHEME.
At this time, there is no guarantee of correctness when building with USE_WORKSPACE=YES, and
workspace builds are not checked by builders.
* Makefile: Use workspace logic when USE_WORKSPACE=YES
* Makefile.shared: xcodebuild invocation logic for workspace builds
* Source/Makefile: Use workspace logic and set custom SCHEME name
* WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: Use XCBuild for workspace
builds
* WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme: Added, to correspond with
the top-level Makefile
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme: Let XCBuild determine build
order
* WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: Let XCBuild determine build
order
Tools:
* Makefile: Use workspace logic and set custom SCHEME name
Modified Paths
Added Paths
Diff
Modified: trunk/ChangeLog (288315 => 288316)
--- trunk/ChangeLog 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/ChangeLog 2022-01-20 21:11:04 UTC (rev 288316)
@@ -1,3 +1,38 @@
+2022-01-20 Elliott Williams <[email protected]>
+
+ [XCBuild] Build via the workspace with USE_WORKSPACE=YES
+ https://bugs.webkit.org/show_bug.cgi?id=235385
+ rdar://87489695
+
+ Reviewed by Alexey Proskuryakov.
+
+ Experimental XCBuild support is available by passing USE_WORKSPACE=YES to Make. This is
+ roughly equivalent to opening WebKit.xcworkspace and building a scheme in the IDE.
+
+ A workspace build is only one `xcodebuild` invocation, in contrast with the traditional
+ recursive-Make build that iterates through each project directory. As a result, workspace
+ builds are faster: the build system can schedule targets from different projects to build
+ simultaneously, and there's lower xcodebuild overhead.
+
+ Workspaces build _schemes_, which are a collection of targets. By default, Make looks for a
+ scheme whose name matches the source directory (Source/WebCore => build scheme "WebCore").
+ Makefiles can customize this by setting SCHEME.
+
+ At this time, there is no guarantee of correctness when building with USE_WORKSPACE=YES, and
+ workspace builds are not checked by builders.
+
+ * Makefile: Use workspace logic when USE_WORKSPACE=YES
+ * Makefile.shared: xcodebuild invocation logic for workspace builds
+ * Source/Makefile: Use workspace logic and set custom SCHEME name
+ * WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: Use XCBuild for workspace
+ builds
+ * WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme: Added, to correspond with
+ the top-level Makefile
+ * WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme: Let XCBuild determine build
+ order
+ * WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: Let XCBuild determine build
+ order
+
2022-01-20 Don Olmstead <[email protected]>
[WinCairo] Make USE_CF conditional on ENABLE_WEBKIT_LEGACY
Modified: trunk/Makefile (288315 => 288316)
--- trunk/Makefile 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/Makefile 2022-01-20 21:11:04 UTC (rev 288316)
@@ -1,3 +1,10 @@
+ifeq ($(USE_WORKSPACE),YES)
+
+include Makefile.shared
+SCHEME = All Modules
+
+else
+
MODULES = Source Tools
define build_target_for_each_module
@@ -31,3 +38,5 @@
installsrc:
$(build_target_for_each_module)
+
+endif # USE_WORKSPACE
Modified: trunk/Makefile.shared (288315 => 288316)
--- trunk/Makefile.shared 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/Makefile.shared 2022-01-20 21:11:04 UTC (rev 288316)
@@ -2,6 +2,17 @@
XCODE_OPTIONS = `perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print XcodeOptionString()' -- $(BUILD_WEBKIT_OPTIONS)` $${COLOR_DIAGNOSTICS_ARG} $(ARGS)
+ifeq ($(USE_WORKSPACE),YES)
+SCHEME ?= $(notdir $(CURDIR))
+XCODE_TARGET = -scheme "$(SCHEME)"
+WORKSPACE := $(firstword $(wildcard \
+ $(dir $(lastword $(MAKEFILE_LIST)))../Internal/WebKit/WebKit.xcworkspace \
+ $(dir $(lastword $(MAKEFILE_LIST)))WebKit.xcworkspace \
+ ))
+else
+SCHEME =
+endif
+
ifneq (,$(SDKROOT))
ifneq (,$(OVERRIDE_SDKROOT))
ifneq (default,$(OVERRIDE_SDKROOT))
@@ -36,17 +47,6 @@
endif
endif
-ifeq ($(findstring UseNewBuildSystem,$(ARGS)),)
- CAN_USE_XCBUILD = $(shell perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print canUseXCBuild()')
- ifeq ($(CAN_USE_XCBUILD),1)
- # Temporarily disable default use of XCBuild until issues with it are ironed out.
- #XCODE_OPTIONS += -UseNewBuildSystem=YES
- XCODE_OPTIONS += -UseNewBuildSystem=NO
- else
- XCODE_OPTIONS += -UseNewBuildSystem=NO
- endif
-endif
-
DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTranscriptVerbosity 2>/dev/null || echo "default")
VERBOSITY ?= $(DEFAULT_VERBOSITY)
@@ -108,9 +108,9 @@
( \
[[ -t 1 ]] && COLOR_DIAGNOSTICS_ARG="COLOR_DIAGNOSTICS=YES"; \
echo; \
- echo "===== BUILDING $$(basename "$$(pwd)") ====="; \
+ echo "===== BUILDING $(if $(WORKSPACE),$(SCHEME),$(notdir $(CURDIR))) ====="; \
echo; \
- $1 xcodebuild $2 $(OTHER_OPTIONS) $(XCODE_TARGET) $(XCODE_OPTIONS) $3 | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} \
+ $1 xcodebuild $2 $(WORKSPACE:%=-workspace %) $(OTHER_OPTIONS) $(XCODE_TARGET) $(XCODE_OPTIONS) $3 | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} \
)
endef
Modified: trunk/Source/Makefile (288315 => 288316)
--- trunk/Source/Makefile 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/Source/Makefile 2022-01-20 21:11:04 UTC (rev 288316)
@@ -1,3 +1,10 @@
+ifeq ($(USE_WORKSPACE),YES)
+
+include ../Makefile.shared
+SCHEME = All Source
+
+else
+
WEBINSPECTORUI_MODULE =
TO_LOWER = $(shell echo $(1) | tr [:upper:] [:lower:])
@@ -51,3 +58,5 @@
installsrc:
@$(build_target_for_each_module)
cp -R ../Source/cmake $(SRCROOT)/Source/
+
+endif # USE_WORKSPACE
Modified: trunk/Tools/ChangeLog (288315 => 288316)
--- trunk/Tools/ChangeLog 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/Tools/ChangeLog 2022-01-20 21:11:04 UTC (rev 288316)
@@ -1,3 +1,13 @@
+2022-01-20 Elliott Williams <[email protected]>
+
+ [XCBuild] Build via the workspace with USE_WORKSPACE=YES
+ https://bugs.webkit.org/show_bug.cgi?id=235385
+ rdar://87489695
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Makefile: Use workspace logic and set custom SCHEME name
+
2022-01-20 Jonathan Bedard <[email protected]>
[EWS] Add CheckOutPullRequest step
Modified: trunk/Tools/Makefile (288315 => 288316)
--- trunk/Tools/Makefile 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/Tools/Makefile 2022-01-20 21:11:04 UTC (rev 288316)
@@ -1,3 +1,10 @@
+ifeq ($(USE_WORKSPACE),YES)
+
+include ../Makefile.shared
+SCHEME = All Tools
+
+else
+
MODULES = DumpRenderTree WebKitTestRunner MiniBrowser ../Source/ThirdParty/gtest/xcode TestWebKitAPI
TO_LOWER = $(shell echo $(1) | tr [:upper:] [:lower:])
@@ -53,3 +60,5 @@
installsrc:
@true
+
+endif # USE_WORKSPACE
\ No newline at end of file
Modified: trunk/WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (288315 => 288316)
--- trunk/WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/WebKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings 2022-01-20 21:11:04 UTC (rev 288316)
@@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>BuildSystemType</key>
- <string>Original</string>
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
<false/>
<key>PreviewsEnabled</key>
Copied: trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme (from rev 288315, trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme) (0 => 288316)
--- trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme (rev 0)
+++ trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme 2022-01-20 21:11:04 UTC (rev 288316)
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "1330"
+ version = "1.7">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "0F7EB8501F95504B00F1ABCB"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Source/bmalloc/bmalloc.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "5D247B6114689B8600E78B76"
+ BuildableName = "libWTF.a"
+ BlueprintName = "WTF"
+ ReferencedContainer = "container:Source/WTF/WTF.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "932F5BE30822A1C700736975"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Source/_javascript_Core/_javascript_Core.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "1CEBD7E22716AFBA00A5254D"
+ BuildableName = "WebGPU.framework"
+ BlueprintName = "WebGPU"
+ ReferencedContainer = "container:Source/WebGPU/WebGPU.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "31DB794F2491C33300982878"
+ BuildableName = "ANGLE"
+ BlueprintName = "ANGLE"
+ ReferencedContainer = "container:Source/ThirdParty/ANGLE/ANGLE.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "FB39D0D01200F0E300088E69"
+ BuildableName = "libwebrtc.dylib"
+ BlueprintName = "libwebrtc"
+ ReferencedContainer = "container:Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "41816F7913859C550057AAA4"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Source/WebCore/WebCore.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A54C2256148B23DF00373FA3"
+ BuildableName = "WebInspectorUI.framework"
+ BlueprintName = "WebInspectorUI"
+ ReferencedContainer = "container:Source/WebInspectorUI/WebInspectorUI.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "9398100A0824BF01008DF038"
+ BuildableName = "WebKitLegacy.framework"
+ BlueprintName = "WebKitLegacy"
+ ReferencedContainer = "container:Source/WebKitLegacy/WebKitLegacy.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "1A50DB38110A3C13000D3FE5"
+ BuildableName = "Framework, XPC Services, and daemons"
+ BlueprintName = "Framework, XPC Services, and daemons"
+ ReferencedContainer = "container:Source/WebKit/WebKit.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A84F608D08B1370600E9745F"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Tools/DumpRenderTree/DumpRenderTree.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A115CCB41B9D769D00E89159"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8D1107260486CEB800E47090"
+ BuildableName = "MiniBrowser.app"
+ BlueprintName = "MiniBrowser"
+ ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "8D07F2BC0486CC7A007CD1D0"
+ BuildableName = "gtest.framework"
+ BlueprintName = "gtest-framework"
+ ReferencedContainer = "container:Source/ThirdParty/gtest/xcode/gtest.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "7C83E02B1D0A5E1000FEBCF3"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "0F7EB8501F95504B00F1ABCB"
+ BuildableName = "All"
+ BlueprintName = "All"
+ ReferencedContainer = "container:Source/bmalloc/bmalloc.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+ <InstallAction
+ buildConfiguration = "Release">
+ </InstallAction>
+</Scheme>
Modified: trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme (288315 => 288316)
--- trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme 2022-01-20 21:11:04 UTC (rev 288316)
@@ -3,7 +3,7 @@
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
- parallelizeBuildables = "NO"
+ parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
Modified: trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme (288315 => 288316)
--- trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme 2022-01-20 20:48:42 UTC (rev 288315)
+++ trunk/WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme 2022-01-20 21:11:04 UTC (rev 288316)
@@ -3,7 +3,7 @@
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
- parallelizeBuildables = "NO"
+ parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry