test: build the RTCP feedback, CES setter and NKWebKit request tests on macOS #16801
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16801"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AdnanKhan-ak47 on 2026-11-07T16:51:05Z.
What
Three test sources on
maindon't compile with Apple clang and libc++, so their four tests can't run on macOS. Only the tests change; the libraries are untouched.<initializer_list>:libwebrtc/tests/RtcpTransportFeedback.cpp(line 22) andtests/GuestCesGbSetters.cpp(line 180) use braced lists in range-for loops. libstdc++ pulls in<initializer_list>through the other headers; libc++ doesn't, so clang stops with "cannot deduce type of initializer list because std::initializer_list was not found". Both now include it.ResourceRequestBase request{}: inlibSceNKWebKit/tests/ResourceRequest.cpp, aggregate initialisation copy-initialises every omitted member from{}.WtfAbi::String's only default constructor isexplicit String(StringImpl* value = nullptr), which copy-initialisation can't use. GCC accepts this; clang rejects it ("chosen constructor is explicit in copy-initialization", lines 29, 64, 89 and 115).ResourceRequestBase request = ResourceRequestBase();). That zeroes the same fields and calls the members' default constructors directly.Tested
macOS 27.2, Apple M4, Apple clang, x86_64 Release under Rosetta 2. Tree: this branch merged into
main090f57166awith #4630, #7804 and #16591, which macOS needs to build the libraries.guest_webrtc_rtcp_transport_feedback,guest_ces_gbsetters,guest_ces_gbsetters_moduleandnkwebkit_resourcerequestpass, 4 of 4.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py: no overlap with open pull requests.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by coptergui-ops on 2026-11-07T20:23:01Z.
Review: APPROVED
All three changes verified locally, including the compiler divergence itself.
ResourceRequestAbi.hpp:21isstruct ResourceRequestBasewithWtfAbi::Stringmembers, andWtfStringAbi.hpp:76gives that class exactly one defaulting constructor,explicit String(StringImpl* value = nullptr).ResourceRequestBasehas no user-declared constructors, sorequest{}aggregate-initialises and copy-initialises each member from{}— ill-formed against an explicit ctor, which is what clang hits at the four cited sites (29, 64, 89, 115 — matching theTestURL/TestFirstParty/TestMethod/TestScalarsfunctions in the test file).struct A { explicit A(long p=0)… }; struct B { A a; }; B x{};): g++ accepts with a warning, clang++ fails with the exact diagnostic quoted in the description ("chosen constructor is explicit in copy-initialization"), andB x = B();compiles cleanly on both. So the fix is portable and the swap preserves meaning: value-initialisation default-constructs the members, which runsString(nullptr)'s direct initialisation (impl = nullptr) and zeroes the POD/bitfield members — the same result the static_assert'd offsetof layout onResourceRequestAbi.hpp:52+expects.<initializer_list>additions match real use sites: line 22 ofRtcpTransportFeedback.cppisfor (std::uint16_t value : {…})and line 180 ofGuestCesGbSetters.cppisfor (Setter setter : {Range, Uda}); neither file included the header before, and the includes land in sorted position. libc++ not transitively pulling it in is the standard reason libstdc++-compiled projects fail on Apple clang.tools/check_conventions.py --base origin/main --head pr-16801reports clean apart from the body placeholder of this run).No blocking findings.
Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-07T22:22:59Z.
Review: COMMENTED
Read
38bddbff44againstmain.The two
<initializer_list>includes cover the braced-list range-for loops in those files (RtcpTransportFeedback.cpp:23,GuestCesGbSetters.cpp:181).ResourceRequestBaseis an aggregate whoseWtfAbi::Stringmembers have only an explicit default constructor, so= ResourceRequestBase()value-initialises it: the object is zeroed and the member constructors are called directly. That keeps what{}meant without the copy-list-initialisation of an explicit constructor that clang rejects, and C++17 guaranteed elision means no copy. The Windows MinGW job built and passed all four touched tests, so GCC is unaffected. Test-only change; nothing to add.Not run here; this is from reading the code and the CI logs.
AI-assisted: yes.