[webkit-changes] [WebKit/WebKit] a775f3: [webkitdirs] Compute Xcode destination specifier
Elliott Williams
noreply at github.com
Wed Jan 17 17:10:21 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a775f3c7a4e4ebb6da8b828b53f9342a05640943
https://github.com/WebKit/WebKit/commit/a775f3c7a4e4ebb6da8b828b53f9342a05640943
Author: Elliott Williams <emw at apple.com>
Date: 2024-01-17 (Wed, 17 Jan 2024)
Changed paths:
M Makefile.shared
M Tools/Scripts/build-imagediff
M Tools/Scripts/set-webkit-configuration
M Tools/Scripts/webkitdirs.pm
M Tools/Scripts/webkitperl/BuildSubproject.pm
Log Message:
-----------
[webkitdirs] Compute Xcode destination specifier
https://bugs.webkit.org/show_bug.cgi?id=266493
rdar://86340301
Reviewed by Alexey Proskuryakov.
Instead of letting xcodebuild pick an ambiguous destination for us, have
webkitdirs compute a destination string based on the SDK and
architecture(s). This allows us to remove much of the hardcoded
architecture logic in webkitdirs, letting the build system figure out
which architecture(s) to use on its own.
Some nice side effects of this change:
- It is possible to build for a non-Mac platform just by setting
SDKROOT. No need to override ARCHS.
- When building for macOS or a simulated platform, the default behaviors
correspond to destinations in Xcode's destination menu. Building with
no architecture override selects the "My Mac" destination or a
simulator on the host system. Building with multiple architectures
selects one of the "Any <platform> Device|Simulator" destinations.
Aligning the destinations in this way helps keep incremental builds
functional when switching between Make and Xcode.
To simplify the problem space, remove set-webkit-configuration's ability
to adjust the architecture, and webkitdirs' corresponding knowledge of
"passed" architecture. set-webkit-configuration's architecture flags
have not been updated since Apple's 64-bit transition in 2009
(https://commits.webkit.org/33755@main).
* Makefile.shared: Pass the active SDK and arch to webkitdirs, to
compute the destination string. Work around shell backticks being
unable to expand an argument containing spaces with a $(shell ...)
directive. Since the variable is only expanded once, webkitdirs is
only called once.
* Tools/Scripts/build-imagediff: No longer need to override architecture.
* Tools/Scripts/set-webkit-configuration: Remove --32-bit and --64-bit
flags which save state in the build directory. This is an old
mechanism from before Apple's 64-bit transition, and is not used by
the present day 32-bit WPE configurations.
(printCurrentSettings):
* Tools/Scripts/webkitdirs.pm:
(determineArchitecture): Don't look for set-webkit-configuration's state
file.
(determineDestination): Added, computes an xcodebuild destination string
based on SDK and architecture(s).
(determineXcodeSDKPlatformName): Refactor to allow a "maccatalyst"
platform name when a SDK is also provided.
(determineXcodeSDK): Special case for "maccatalyst" as a platform name.
(XcodeOptions):
(XcodeOptionString): Enclose arguments containing spaces in quotes, for
shell substitution.
(setConfiguration):
(destination): Added.
(determinePassedArchitecture): Deleted.
(passedArchitecture): Deleted.
(setArchitecture): Deleted.
* Tools/Scripts/webkitperl/BuildSubproject.pm: Argument parser was
relying on shouldBuild32Bit() being called early on in evaluation,
make the call explicit.
Canonical link: https://commits.webkit.org/273153@main
More information about the webkit-changes
mailing list