Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 97338b527686876a6422d8f88320ad3a240787fd
https://github.com/WebKit/WebKit/commit/97338b527686876a6422d8f88320ad3a240787fd
Author: David Kilzer <[email protected]>
Date: 2026-05-18 (Mon, 18 May 2026)
Changed paths:
M Tools/TestWebKitAPI/Configurations/TestWebKitAPIApp.xcconfig
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Log Message:
-----------
[TestWebKitAPI] Fix gtest linking for Production builds
<https://bugs.webkit.org/show_bug.cgi?id=314959>
<rdar://177253966>
Reviewed by Elliott Williams.
In Production builds, gtest is built as a separate project
(`gtest-static`, libgtest.a) and its outputs are provided to dependent
projects via the dependency system. The cross-project reference causes
the TestWebKitAPI sandbox to try rebuilding gtest-static from source,
but the Production sandbox does not provision all source files needed by
the `#include`-based unity build in `gtest-all.cc`, causing
`gtest-assertion-result.cc` to be missing.
Remove explicit `PBXTargetDependency` entries on
`gtest-framework` from all TestWebKitAPI targets and change
`-framework gtest` to `-lgtest` in TestWebKitAPIApp.xcconfig.
The `PBXTargetDependency` entries being removed were added in:
- Bug 243806: WebProcessPlugIn, InjectedBundleTestWebKitAPI,
TestWebKitAPILibrary -- so TestWebKitAPI could build standalone via
`make -C Tools` after disabling implicit dependencies in the "All
WebKit Tools" workspace scheme.
- Bug 245061: TestWGSL -- following the pattern from Bug 243806.
- Bug 262025: TestWTFLibrary -- after its prefix header compilation
failed because gtest headers had not been installed yet.
Keep the gtest.xcodeproj file reference, the proxyType=2 product
reference, and the libgtest.a link-phase references intact so the linker
can still find the pre-built gtest library.
* Tools/TestWebKitAPI/Configurations/TestWebKitAPIApp.xcconfig:
- Change `-framework gtest` to `-lgtest` to match
TestWebKitAPI.xcconfig.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Remove PBXTargetDependency and PBXContainerItemProxy entries for
gtest-framework from TestWGSL, TestWTFLibrary, TestWebKitAPILibrary,
WebProcessPlugIn, and InjectedBundleTestWebKitAPI targets.
Canonical link: https://commits.webkit.org/313436@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications