Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 338fd1ca5d9ae731fe67d5eb2adc0eaf098514b7
https://github.com/WebKit/WebKit/commit/338fd1ca5d9ae731fe67d5eb2adc0eaf098514b7
Author: Jean-Yves Avenard <[email protected]>
Date: 2026-09-11 (Fri, 11 Sep 2026)
Changed paths:
M Source/WebKit/PlatformCocoa.cmake
M Tools/Scripts/build-webkit
M Tools/Scripts/run-safari
M Tools/Scripts/set-webkit-configuration
M Tools/Scripts/webkit-build-directory
M Tools/Scripts/webkitdirs.pm
A
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildDefault.pl
R
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildLastBuiltASan.pl
R
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildLastBuiltCMake.pl
R
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildLastBuiltXcode.pl
A
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildMarker.pl
A
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildXcodeOverridesMarker.pl
A Tools/Scripts/webkitperl/webkitdirs_unittest/recordBuildSettings.pl
A
Tools/Scripts/webkitperl/webkitdirs_unittest/recordBuildSettingsNonCocoa.pl
M Tools/Scripts/webkitpy/port/factory.py
Log Message:
-----------
[cmake] Parameters given to build-webkit should be persistent and consistent
with set-webkit-configuration
https://bugs.webkit.org/show_bug.cgi?id=323399
rdar://186634571
Reviewed by Elliott Williams.
The two scripts that take build settings did not agree on which of those
settings
stick. `set-webkit-configuration --debug` was remembered, so a later
run-webkit-tests used the Debug build, but `build-webkit --debug` was forgotten,
so the same run-webkit-tests used Release. The build system behaved the other
way
round: `build-webkit --cmake` effectively stuck, because every tool went looking
for a CMake build directory and found the one that build had just made, while
`set-webkit-configuration --cmake` recorded nothing and a following build-webkit
went back to Xcode.
Both scripts now remember what they were given, so `build-webkit --debug
--cmake`
followed by a bare run-webkit-tests uses the Debug CMake build, and
set-webkit-configuration takes --cmake and --xcode to choose the build system
without building. Only the settings actually passed are written, so the others
keep whatever they were already set to.
The build system is recorded in WebKitBuild/BuildSystem, alongside Configuration
and the sanitizer files, and holds "CMake" or "Xcode". determineIsCMakeBuild()
reads it the way determineConfiguration() reads Configuration: --cmake or
--xcode
on the command line wins, otherwise the recorded value, otherwise Xcode. That
replaces working the build system out from the build directory — the presence of
cmake-<platform>/<configuration>/CMakeCache.txt, plus a comparison in
webkit-build-directory alone of the CMake tree's .ninja_log against
XCBuildData/build.db to prefer whichever was built last, which let it disagree
with the perl tools about which build was current.
* Source/WebKit/PlatformCocoa.cmake: Bake into each XPC service the way back to
the frameworks beside the framework it lives in, the way Xcode does through
WK_PATH_FROM_SERVICE_EXECUTABLE_TO_FRAMEWORKS. launchd starts a service with no
environment pointing at the build directory, so without it a service loaded the
installed WebKit and was killed for the version mismatch.
* Tools/Scripts/build-webkit: Record the settings this build was given, and
document that they are remembered.
* Tools/Scripts/set-webkit-configuration: Accept --cmake and --xcode, and clear
BuildSystem on --reset. Reset before any marker file is read, so the settings
printed afterwards are the defaults rather than the ones just deleted.
(printCurrentSettings): Report the build system.
* Tools/Scripts/run-safari: Run the Safari named on the command line above the
WebKit the recorded settings resolve.
* Tools/Scripts/webkit-build-directory: Stop enabling the last-built tiebreaker,
and document --cmake and --xcode.
* Tools/Scripts/webkitdirs.pm:
(passedSanitizer): Added. Tells an explicit --asan or --tsan apart from the
marker
file, so that only what was passed gets recorded.
(determineASanIsEnabled): Use it.
(determineTSanIsEnabled): Ditto.
(argumentsForConfiguration): Pass --cmake or --xcode on only when one was given;
without one the child reads the same marker this process did.
(checkBuild): Report the build system and where it was resolved from.
(determinePassedBuildSystem): Added.
(passedBuildSystem): Added.
(determineIsCMakeBuild): Resolve from the argument, then
WebKitBuild/BuildSystem,
then Xcode. Removed the CMakeCache.txt check and the .ninja_log against
XCBuildData/build.db comparison.
(enableLastBuiltTiebreaker): Removed.
(buildSystem): Added.
(writeBuildSetting): Added.
(recordBuildSettings): Added.
(dyldFrameworkPathsForMacWebKitApp): Take the second path from the directory the
app being run was built into, rather than from the Xcode directory of the
configuration this command was given.
(recordedConfiguration): Added.
(webkitProductDir): Added. The directory WebKit itself was built into, which is
not the product directory when an app Xcode alone builds is run above it.
* Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildDefault.pl:
Added.
*
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildLastBuiltASan.pl:
Removed.
*
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildLastBuiltCMake.pl:
Removed.
*
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildLastBuiltXcode.pl:
Removed.
* Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildMarker.pl:
Added.
*
Tools/Scripts/webkitperl/webkitdirs_unittest/determineIsCMakeBuildXcodeOverridesMarker.pl:
Added.
* Tools/Scripts/webkitperl/webkitdirs_unittest/recordBuildSettings.pl: Added.
* Tools/Scripts/webkitpy/port/factory.py:
(configuration_options): Update the --cmake, --xcode and --asan help.
Canonical link: https://commits.webkit.org/320925@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications