Skip to content

Commit 1648743

Browse files
committed
[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
1 parent c55c39c commit 1648743

File tree

10 files changed

+189
-15
lines changed

10 files changed

+189
-15
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ifeq ($(USE_WORKSPACE),YES)
1+
ifneq ($(USE_WORKSPACE),NO)
22

33
SCHEME = All Modules
44
SCRIPTS_PATH = Tools/Scripts

Makefile.shared

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SCRIPTS_PATH ?= ../Tools/Scripts
22

3-
ifeq ($(USE_WORKSPACE),YES)
3+
ifneq ($(USE_WORKSPACE),NO)
44
SCHEME ?= $(notdir $(CURDIR))
55
XCODE_TARGET = -scheme "$(SCHEME)"
66

@@ -12,9 +12,11 @@ endif
1212
# happen in the workspace. When this is only passed on the command line, it
1313
# invalidates build results made in the IDE (rdar://88135402).
1414
#XCODE_OPTIONS += WK_VALIDATE_DEPENDENCIES=YES_ERROR
15+
BUILD_GOAL = $(SCHEME)
1516
else
1617
USE_WORKSPACE =
1718
BUILD_WEBKIT_OPTIONS += --no-use-workspace
19+
BUILD_GOAL = $(notdir $(CURDIR))
1820
endif
1921

2022

@@ -125,7 +127,7 @@ endef
125127
define invoke_xcode
126128
( \
127129
echo; \
128-
echo "===== BUILDING $(if $(USE_WORKSPACE),$(SCHEME),$(notdir $(CURDIR))) ====="; \
130+
echo "===== BUILDING $(BUILD_GOAL) ====="; \
129131
echo; \
130132
$1 xcodebuild $2 $(OTHER_OPTIONS) $(XCODE_TARGET) $(XCODE_OPTIONS) $3 | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} \
131133
)

Source/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ifeq ($(USE_WORKSPACE),YES)
1+
ifneq ($(USE_WORKSPACE),NO)
22

33
include ../Makefile.shared
44
SCHEME = All Source
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1330"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "14F271BD18EA3963008C152F"
18+
BuildableName = "libbmalloc.a"
19+
BlueprintName = "bmalloc"
20+
ReferencedContainer = "container:bmalloc.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "14F271BD18EA3963008C152F"
54+
BuildableName = "libbmalloc.a"
55+
BlueprintName = "bmalloc"
56+
ReferencedContainer = "container:bmalloc.xcodeproj">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
<InstallAction
68+
buildConfiguration = "Release">
69+
</InstallAction>
70+
</Scheme>

Tools/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ifeq ($(USE_WORKSPACE),YES)
1+
ifneq ($(USE_WORKSPACE),NO)
22

33
include ../Makefile.shared
44
SCHEME = All Tools
@@ -61,4 +61,4 @@ clean:
6161
installsrc:
6262
@true
6363

64-
endif # USE_WORKSPACE
64+
endif # USE_WORKSPACE

Tools/MobileMiniBrowser/Configurations/Base.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ MTL_ENABLE_DEBUG_INFO = NO;
8282
VALIDATE_PRODUCT = YES;
8383
WARNING_CFLAGS = -Wall -W -Wformat=2 -Wno-unused-parameter -Wundef;
8484

85-
SUPPORTED_PLATFORMS = iphoneos iphonesimulator;
85+
SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator;
8686
SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
8787
SDKROOT_ = macosx;
8888
SDKROOT_YES = macosx.internal;

Tools/MobileMiniBrowser/Configurations/MobileMiniBrowser.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2323

2424
PRODUCT_NAME = MiniBrowser
25-
2625
STRIP_STYLE=debugging
26+
SUPPORTED_PLATFORMS = iphoneos iphonesimulator;

Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 52;
77
objects = {
88

9+
/* Begin PBXAggregateTarget section */
10+
DD2A1D052888D1CB00342472 /* MobileMiniBrowser (Platform filters) */ = {
11+
isa = PBXAggregateTarget;
12+
buildConfigurationList = DD2A1D082888D1CB00342472 /* Build configuration list for PBXAggregateTarget "MobileMiniBrowser (Platform filters)" */;
13+
buildPhases = (
14+
);
15+
dependencies = (
16+
DD2A1D0A2888D1D300342472 /* PBXTargetDependency */,
17+
);
18+
name = "MobileMiniBrowser (Platform filters)";
19+
productName = "MiniBrowser (Platform filters)";
20+
};
21+
/* End PBXAggregateTarget section */
22+
923
/* Begin PBXBuildFile section */
1024
3F0B439B1D908D0C00D186B5 /* looping2s.html in Resources */ = {isa = PBXBuildFile; fileRef = 3F0B439A1D908D0C00D186B5 /* looping2s.html */; };
1125
3F0B439D1D908DE700D186B5 /* test2s.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 3F0B439C1D908DE700D186B5 /* test2s.mp4 */; };
@@ -44,6 +58,13 @@
4458
remoteGlobalIDString = CD498B3A1D76348000681FA7;
4559
remoteInfo = MobileMiniBrowser;
4660
};
61+
DD2A1D092888D1D300342472 /* PBXContainerItemProxy */ = {
62+
isa = PBXContainerItemProxy;
63+
containerPortal = CD1DAF8A1D709E3600017CF0 /* Project object */;
64+
proxyType = 1;
65+
remoteGlobalIDString = CD1DAF911D709E3600017CF0;
66+
remoteInfo = MobileMiniBrowser;
67+
};
4768
/* End PBXContainerItemProxy section */
4869

4970
/* Begin PBXCopyFilesBuildPhase section */
@@ -302,6 +323,9 @@
302323
CreatedOnToolsVersion = 8.0;
303324
ProvisioningStyle = Automatic;
304325
};
326+
DD2A1D052888D1CB00342472 = {
327+
CreatedOnToolsVersion = 13.3;
328+
};
305329
};
306330
};
307331
buildConfigurationList = CD1DAF8D1D709E3600017CF0 /* Build configuration list for PBXProject "MobileMiniBrowser" */;
@@ -320,6 +344,7 @@
320344
CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */,
321345
CD1DAFAA1D709E3600017CF0 /* MobileMiniBrowserUITests */,
322346
CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */,
347+
DD2A1D052888D1CB00342472 /* MobileMiniBrowser (Platform filters) */,
323348
);
324349
};
325350
/* End PBXProject section */
@@ -396,6 +421,12 @@
396421
target = CD498B3A1D76348000681FA7 /* MobileMiniBrowser.framework */;
397422
targetProxy = CD498B401D76348000681FA7 /* PBXContainerItemProxy */;
398423
};
424+
DD2A1D0A2888D1D300342472 /* PBXTargetDependency */ = {
425+
isa = PBXTargetDependency;
426+
platformFilter = ios;
427+
target = CD1DAF911D709E3600017CF0 /* MobileMiniBrowser */;
428+
targetProxy = DD2A1D092888D1D300342472 /* PBXContainerItemProxy */;
429+
};
399430
/* End PBXTargetDependency section */
400431

401432
/* Begin PBXVariantGroup section */
@@ -438,7 +469,10 @@
438469
buildSettings = {
439470
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
440471
INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
441-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
472+
LD_RUNPATH_SEARCH_PATHS = (
473+
"$(inherited)",
474+
"@executable_path/Frameworks",
475+
);
442476
PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser;
443477
PRODUCT_NAME = MobileMiniBrowser;
444478
TARGETED_DEVICE_FAMILY = "1,2";
@@ -451,7 +485,10 @@
451485
buildSettings = {
452486
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
453487
INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
454-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
488+
LD_RUNPATH_SEARCH_PATHS = (
489+
"$(inherited)",
490+
"@executable_path/Frameworks",
491+
);
455492
PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowser;
456493
PRODUCT_NAME = MobileMiniBrowser;
457494
TARGETED_DEVICE_FAMILY = "1,2";
@@ -462,7 +499,11 @@
462499
isa = XCBuildConfiguration;
463500
buildSettings = {
464501
INFOPLIST_FILE = MobileMiniBrowserUITests/Info.plist;
465-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
502+
LD_RUNPATH_SEARCH_PATHS = (
503+
"$(inherited)",
504+
"@executable_path/Frameworks",
505+
"@loader_path/Frameworks",
506+
);
466507
PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserUITests;
467508
PRODUCT_NAME = "$(TARGET_NAME)";
468509
TEST_TARGET_NAME = MobileMiniBrowser;
@@ -473,7 +514,11 @@
473514
isa = XCBuildConfiguration;
474515
buildSettings = {
475516
INFOPLIST_FILE = MobileMiniBrowserUITests/Info.plist;
476-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
517+
LD_RUNPATH_SEARCH_PATHS = (
518+
"$(inherited)",
519+
"@executable_path/Frameworks",
520+
"@loader_path/Frameworks",
521+
);
477522
PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserUITests;
478523
PRODUCT_NAME = "$(TARGET_NAME)";
479524
TEST_TARGET_NAME = MobileMiniBrowser;
@@ -491,7 +536,11 @@
491536
DYLIB_INSTALL_NAME_BASE = "@rpath";
492537
INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
493538
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
494-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
539+
LD_RUNPATH_SEARCH_PATHS = (
540+
"$(inherited)",
541+
"@executable_path/Frameworks",
542+
"@loader_path/Frameworks",
543+
);
495544
PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework;
496545
PRODUCT_NAME = MobileMiniBrowser;
497546
SKIP_INSTALL = YES;
@@ -511,7 +560,11 @@
511560
DYLIB_INSTALL_NAME_BASE = "@rpath";
512561
INFOPLIST_FILE = MobileMiniBrowser/Info.plist;
513562
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
514-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
563+
LD_RUNPATH_SEARCH_PATHS = (
564+
"$(inherited)",
565+
"@executable_path/Frameworks",
566+
"@loader_path/Frameworks",
567+
);
515568
PRODUCT_BUNDLE_IDENTIFIER = org.webkit.MobileMiniBrowserFramework;
516569
PRODUCT_NAME = MobileMiniBrowser;
517570
SKIP_INSTALL = YES;
@@ -520,6 +573,18 @@
520573
};
521574
name = Release;
522575
};
576+
DD2A1D062888D1CB00342472 /* Debug */ = {
577+
isa = XCBuildConfiguration;
578+
buildSettings = {
579+
};
580+
name = Debug;
581+
};
582+
DD2A1D072888D1CB00342472 /* Release */ = {
583+
isa = XCBuildConfiguration;
584+
buildSettings = {
585+
};
586+
name = Release;
587+
};
523588
/* End XCBuildConfiguration section */
524589

525590
/* Begin XCConfigurationList section */
@@ -559,6 +624,15 @@
559624
defaultConfigurationIsVisible = 0;
560625
defaultConfigurationName = Release;
561626
};
627+
DD2A1D082888D1CB00342472 /* Build configuration list for PBXAggregateTarget "MobileMiniBrowser (Platform filters)" */ = {
628+
isa = XCConfigurationList;
629+
buildConfigurations = (
630+
DD2A1D062888D1CB00342472 /* Debug */,
631+
DD2A1D072888D1CB00342472 /* Release */,
632+
);
633+
defaultConfigurationIsVisible = 0;
634+
defaultConfigurationName = Release;
635+
};
562636
/* End XCConfigurationList section */
563637
};
564638
rootObject = CD1DAF8A1D709E3600017CF0 /* Project object */;

WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,20 @@
188188
ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj">
189189
</BuildableReference>
190190
</BuildActionEntry>
191+
<BuildActionEntry
192+
buildForTesting = "YES"
193+
buildForRunning = "YES"
194+
buildForProfiling = "YES"
195+
buildForArchiving = "YES"
196+
buildForAnalyzing = "YES">
197+
<BuildableReference
198+
BuildableIdentifier = "primary"
199+
BlueprintIdentifier = "DD2A1D052888D1CB00342472"
200+
BuildableName = "MobileMiniBrowser (Platform filters)"
201+
BlueprintName = "MobileMiniBrowser (Platform filters)"
202+
ReferencedContainer = "container:Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj">
203+
</BuildableReference>
204+
</BuildActionEntry>
191205
<BuildActionEntry
192206
buildForTesting = "YES"
193207
buildForRunning = "YES"

WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@
2020
ReferencedContainer = "container:Tools/DumpRenderTree/DumpRenderTree.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "DD2A1D052888D1CB00342472"
32+
BuildableName = "MobileMiniBrowser (Platform filters)"
33+
BlueprintName = "MobileMiniBrowser (Platform filters)"
34+
ReferencedContainer = "container:Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
2337
<BuildActionEntry
2438
buildForTesting = "YES"
2539
buildForRunning = "YES"

0 commit comments

Comments
 (0)