Skip to content
Permalink
Browse files
[Xcode] Use workspace builds by default in build-webkit
https://bugs.webkit.org/show_bug.cgi?id=241298

Reviewed by Alexey Proskuryakov.

Switch the default value of the --use-workspace flag, and add a warning
message indicating that non-workspace Xcode builds are deprecated.

Add product dependencies and disable SDK metadata parsing in tools
projects, to prevent watchOS/tvOS workspace builds from thinking we are
linking against system WebKit.

Add an aggregate "MiniBrowser (Platform filters)" target, which builds
MiniBrowser.app iff the workspace is building for a Mac destination.

* Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig: Fix
  an sdk xcconfig setting.
* Tools/DumpRenderTree/mac/Configurations/DumpRenderTreeLibrary.xcconfig:
  Set DISABLE_SDK_METADATA_PARSING.
* Tools/DumpRenderTree/mac/Configurations/LayoutTestHelper.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: Create the
  aggregate target mentioned above.
* Tools/MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
  Link MobileMiniBrowser.framework against WebKit.
* Tools/Scripts/build-webkit: Switch --use-workspace default.
* Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/TestWebKitAPI/Configurations/TestWTFLibrary.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Set
  DISABLE_SDK_METADATA_PARSING.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add
  WebKit product dependency.
* Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig: Add
  DISABLE_SDK_METADATA_PARSING.
* Tools/WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig: Add
  DISABLE_SDK_METADATA_PARSING.
* WebKit.xcworkspace/xcshareddata/xcschemes/All Modules.xcscheme:
  Replace MiniBrowser.app with the aggregate target.
* WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: Replace
  MiniBrowser.app with the aggregate target.

Canonical link: https://commits.webkit.org/251501@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
emw-apple committed Jun 13, 2022
1 parent 4ce348e commit c67ee46115278a11d7a489f8229d16af31097cbb
Show file tree
Hide file tree
Showing 14 changed files with 115 additions and 11 deletions.
@@ -48,7 +48,7 @@ WK_CCACHE_DIR = $(SRCROOT)/../../../Tools/ccache;
#include "../../../../Tools/ccache/ccache.xcconfig"

OTHER_LDFLAGS[config=Debug][sdk=iphone*] = $(inherited) -framework UIKit -framework CoreGraphics
OTHER_LDFLAGS[config=Debug][sdk=tv*] = $(inherited) -framework UIKit -framework CoreGraphics
OTHER_LDFLAGS[config=Debug][sdk=appletv*] = $(inherited) -framework UIKit -framework CoreGraphics
OTHER_LDFLAGS[config=Debug][sdk=watch*] = $(inherited) -framework UIKit -framework CoreGraphics
OTHER_LDFLAGS[config=Debug][sdk=macosx*] = $(inherited) $(OTHER_LDFLAGS_$(WK_IS_CATALYST))
OTHER_LDFLAGS_YES = -framework UIKit -framework CoreGraphics
@@ -28,6 +28,10 @@
PRODUCT_NAME = DumpRenderTree;
SKIP_INSTALL = YES;

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;

OTHER_LDFLAGS = ;

EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH)) $(EXCLUDED_PRODUCT_DEPENDENCY_NAMES_$(WK_WHICH_BUILD_SYSTEM));
@@ -28,6 +28,10 @@
OTHER_LDFLAGS[sdk=macosx*] = $(inherited) -framework Carbon -framework Cocoa -framework OpenGL -framework IOKit;
STRIP_STYLE = debugging;

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;

EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_PRODUCT_DEPENDENCY_NAMES_$(WK_WHICH_BUILD_SYSTEM));
EXCLUDED_PRODUCT_DEPENDENCY_NAMES_legacy = WebKit.framework;

@@ -6,6 +6,20 @@
objectVersion = 46;
objects = {

/* Begin PBXAggregateTarget section */
DD403C872851B13F00D899FC /* MiniBrowser (Platform filters) */ = {
isa = PBXAggregateTarget;
buildConfigurationList = DD403C8A2851B13F00D899FC /* Build configuration list for PBXAggregateTarget "MiniBrowser (Platform filters)" */;
buildPhases = (
);
dependencies = (
DD403C8C2851B14300D899FC /* PBXTargetDependency */,
);
name = "MiniBrowser (Platform filters)";
productName = "MiniBrowser (Mac-only)";
};
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
0FE643A1161FA8940059E3FF /* BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FE643A0161FA8940059E3FF /* BrowserWindowController.m */; };
0FE643A4161FAC660059E3FF /* WK1BrowserWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FE643A3161FAC660059E3FF /* WK1BrowserWindowController.m */; };
@@ -21,6 +35,16 @@
BC72B89611E57E0F001EB4EA /* BrowserWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC3294A2116A9852008635D0 /* BrowserWindow.xib */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
DD403C8B2851B14300D899FC /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
proxyType = 1;
remoteGlobalIDString = 8D1107260486CEB800E47090;
remoteInfo = MiniBrowser;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
0FE6439F161FA8940059E3FF /* BrowserWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BrowserWindowController.h; path = mac/BrowserWindowController.h; sourceTree = "<group>"; };
0FE643A0161FA8940059E3FF /* BrowserWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BrowserWindowController.m; path = mac/BrowserWindowController.m; sourceTree = "<group>"; };
@@ -53,6 +77,7 @@
BCA8CBDD11E578A000812FB7 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
BCA8CBDE11E578A000812FB7 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
BCA8CBDF11E578A000812FB7 /* MiniBrowser.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = MiniBrowser.xcconfig; sourceTree = "<group>"; };
DD403C5328500F6400D899FC /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -138,6 +163,7 @@
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
1AFFEF761860EE6800DA465E /* Cocoa.framework */,
5C9332AE24C1349C0036DECE /* SecurityInterface.framework */,
DD403C5328500F6400D899FC /* WebKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -204,6 +230,7 @@
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* MiniBrowser */,
DD403C872851B13F00D899FC /* MiniBrowser (Platform filters) */,
);
};
/* End PBXProject section */
@@ -239,6 +266,17 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
DD403C8C2851B14300D899FC /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
platformFilters = (
macos,
);
target = 8D1107260486CEB800E47090 /* MiniBrowser */;
targetProxy = DD403C8B2851B14300D899FC /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
@@ -269,6 +307,18 @@
};
name = Release;
};
DD403C882851B13F00D899FC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Debug;
};
DD403C892851B13F00D899FC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
@@ -290,6 +340,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
DD403C8A2851B13F00D899FC /* Build configuration list for PBXAggregateTarget "MiniBrowser (Platform filters)" */ = {
isa = XCConfigurationList;
buildConfigurations = (
DD403C882851B13F00D899FC /* Debug */,
DD403C892851B13F00D899FC /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
@@ -12,7 +12,6 @@
CD1DAF971D709E3600017CF0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAF961D709E3600017CF0 /* main.m */; };
CD1DAFA51D709E3600017CF0 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD1DAFA31D709E3600017CF0 /* LaunchScreen.storyboard */; };
CD1DAFB01D709E3600017CF0 /* MobileMiniBrowserUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD1DAFAF1D709E3600017CF0 /* MobileMiniBrowserUITests.m */; };
CD1DAFC21D70E12D00017CF0 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD1DAFC11D70E12D00017CF0 /* WebKit.framework */; };
CD498B421D76348000681FA7 /* MobileMiniBrowser.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */; };
CD498B431D76348000681FA7 /* MobileMiniBrowser.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CD498B3B1D76348000681FA7 /* MobileMiniBrowser.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CD498B4A1D763D4800681FA7 /* MobileMiniBrowser.h in Headers */ = {isa = PBXBuildFile; fileRef = CD498B481D7634C700681FA7 /* MobileMiniBrowser.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -27,6 +26,7 @@
CDA985191D76483400EBC399 /* test.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = CDA985151D76477900EBC399 /* test.mp4 */; };
CDA9851A1D76483400EBC399 /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = CDA985131D76474100EBC399 /* index.html */; };
CDA9851B1D76483400EBC399 /* looping.html in Resources */ = {isa = PBXBuildFile; fileRef = CDA985171D7647CD00EBC399 /* looping.html */; };
DD403C5828500FE300D899FC /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD1DAFC11D70E12D00017CF0 /* WebKit.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
@@ -97,7 +97,6 @@
buildActionMask = 2147483647;
files = (
CD498B421D76348000681FA7 /* MobileMiniBrowser.framework in Frameworks */,
CD1DAFC21D70E12D00017CF0 /* WebKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -112,6 +111,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DD403C5828500FE300D899FC /* WebKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -74,7 +74,7 @@ my $coverageSupport = 0;
my $shouldRunStaticAnalyzer = 0;
my $noExperimentalFeatures = 0;
my $ltoMode = "default";
my $useWorkspace = undef;
my $useWorkspace = 1;
my $startTime = time();
my $archs32bit = 0;
my $skipLibraryUpdate = 0;
@@ -122,7 +122,7 @@ Usage: $programName [options] [options to pass to build system]
--coverage Enable code coverage support (Mac only)
--analyze Enable static anaylsis (Apple platforms only)
--lto-mode=<mode> Set Link Time Optimization mode (full, thin, or none) (LLVM only)
--[no-]use-workspace Use WebKit.xcworkspace and XCBuild (Apple platforms only)
--no-use-workspace Build projects one at a time instead of using WebKit.xcworkspace (Apple platforms only)
--ftw Build the FTW Windows port
--gtk Build the GTK+ port
@@ -242,6 +242,10 @@ if (isAppleCocoaWebKit()) {

# In workspaces, build order is determined by XCBuild.
if (!$useWorkspace) {
print STDERR "warning: Building with --no-use-workspace is " .
"deprecated.\nIf you have a workflow requirement that depends " .
"on building targets in manual order, please document it in " .
"https://bugs.webkit.org/show_bug.cgi?id=241295.\n";
# ANGLE and libwebrtc must come before WebCore
splice @projects, 0, 0, ("Source/ThirdParty/ANGLE");
# if (not $archs32bit and (portName() eq Mac or portName() eq iOS or portName() eq watchOS)) {
@@ -29,3 +29,7 @@ FRAMEWORK_AND_LIBRARY_LDFLAGS[sdk=embedded*] = -lobjc -framework UIKit;
FRAMEWORK_AND_LIBRARY_LDFLAGS[sdk=macosx*] = -framework JavaScriptCore -framework WebKit -framework CoreGraphics -framework Cocoa;

OTHER_LDFLAGS = $(inherited) $(FRAMEWORK_AND_LIBRARY_LDFLAGS);

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;
@@ -27,5 +27,9 @@ PRODUCT_NAME = TestWTF;
SKIP_INSTALL = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = YES;

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;

EXCLUDED_SOURCE_FILE_NAMES = $(inherited) $(EXCLUDED_PRODUCT_DEPENDENCY_NAMES_$(WK_WHICH_BUILD_SYSTEM));
EXCLUDED_PRODUCT_DEPENDENCY_NAMES_legacy = libgtest.a WebKit.framework;
@@ -29,6 +29,10 @@ GCC_ENABLE_OBJC_EXCEPTIONS = YES;

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) GTEST_API_=

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;

WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
WK_PRIVATE_FRAMEWORKS_DIR_[sdk=macos*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/$(TARGET_MAC_OS_X_VERSION_MAJOR);
WK_PRIVATE_FRAMEWORKS_DIR_[sdk=iphone*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/$(WK_TARGET_IOS_VERSION_MAJOR);
@@ -984,6 +984,7 @@
CEBCA13B1E3A807A00C73293 /* page-without-csp-iframe.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CEBCA1361E3A803400C73293 /* page-without-csp-iframe.html */; };
CEDA12412437C9FB00C28A9E /* editable-region-composited-and-non-composited-overlap.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = CEDA12402437C9EA00C28A9E /* editable-region-composited-and-non-composited-overlap.html */; };
DD0EDF8D2798A6AD005152AD /* libgtest.a in Product Dependencies */ = {isa = PBXBuildFile; fileRef = F3FC3EE213678B7300126A65 /* libgtest.a */; };
DD42949F284BE0B7004D49ED /* WebKit.framework in Product Dependencies */ = {isa = PBXBuildFile; fileRef = C081224813FC1B0300DC39AE /* WebKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DDD2187627A21750002B7025 /* WebKit.framework in Product Dependencies */ = {isa = PBXBuildFile; fileRef = C081224813FC1B0300DC39AE /* WebKit.framework */; };
DF1C7CE927F5161D00D8145C /* BundlePageConsoleMessageWithDetails.mm in Sources */ = {isa = PBXBuildFile; fileRef = DF1C7CE827F5161D00D8145C /* BundlePageConsoleMessageWithDetails.mm */; };
DF1C7CEC27F5309700D8145C /* console-message-with-details.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = DF1C7CEB27F5305A00D8145C /* console-message-with-details.html */; };
@@ -1715,6 +1716,17 @@
name = "Product Dependencies";
runOnlyForDeploymentPostprocessing = 0;
};
DD42949E284BE0A6004D49ED /* Product Dependencies */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 7;
files = (
DD42949F284BE0B7004D49ED /* WebKit.framework in Product Dependencies */,
);
name = "Product Dependencies";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
@@ -5321,6 +5333,7 @@
isa = PBXNativeTarget;
buildConfigurationList = BC575986126E74AF006F0F12 /* Build configuration list for PBXNativeTarget "InjectedBundleTestWebKitAPI" */;
buildPhases = (
DD42949E284BE0A6004D49ED /* Product Dependencies */,
BC57597C126E74AF006F0F12 /* Resources */,
BC57597D126E74AF006F0F12 /* Sources */,
BC57597E126E74AF006F0F12 /* Frameworks */,
@@ -37,6 +37,10 @@ OTHER_LDFLAGS_ = -framework Carbon -framework Cocoa -lAccessibility;

STRIP_STYLE = debugging;

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;

EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH));
EXCLUDED_SOURCE_FILE_NAMES_cocoatouch = AccessibilityControllerMac.mm AccessibilityTextMarkerMac.mm AccessibilityUIElementMac.mm ActivateFonts.mm InjectedBundleMac.mm InjectedBundlePageMac.mm;
EXCLUDED_SOURCE_FILE_NAMES_ = *IOS.*;
@@ -34,6 +34,10 @@ OTHER_LDFLAGS[sdk=macosx*] = $(inherited) -lWebKitTestRunner -framework Carbon -
STRIP_STYLE = debugging;
SKIP_INSTALL[sdk=embedded*] = YES;

// Workaround for "WebKit is not available..." error (rdar://91668054)
DISABLE_SDK_METADATA_PARSING[sdk=appletv*] = YES;
DISABLE_SDK_METADATA_PARSING[sdk=watch*] = YES;

EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(WK_COCOA_TOUCH));
EXCLUDED_SOURCE_FILE_NAMES_ = ;
EXCLUDED_SOURCE_FILE_NAMES_cocoatouch = mac/*;
@@ -182,9 +182,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "MiniBrowser.app"
BlueprintName = "MiniBrowser"
BlueprintIdentifier = "DD403C872851B13F00D899FC"
BuildableName = "MiniBrowser (Platform filters)"
BlueprintName = "MiniBrowser (Platform filters)"
ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj">
</BuildableReference>
</BuildActionEntry>
@@ -28,9 +28,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D1107260486CEB800E47090"
BuildableName = "MiniBrowser.app"
BlueprintName = "MiniBrowser"
BlueprintIdentifier = "DD403C872851B13F00D899FC"
BuildableName = "MiniBrowser (Platform filters)"
BlueprintName = "MiniBrowser (Platform filters)"
ReferencedContainer = "container:Tools/MiniBrowser/MiniBrowser.xcodeproj">
</BuildableReference>
</BuildActionEntry>

0 comments on commit c67ee46

Please sign in to comment.