fix(libc): declare the type_info class, the wide size clamp and environ that Apple clang needs #18905
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18905"
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 atinseau on 2026-11-12T13:07:06Z.
What
Three declarations that Apple clang and libc++ need and that
mainlacks, each one line:libctakestypeid(__cxxabiv1::__fundamental_type_info)for its fundamental type_info records (#10548), but libc++abi defines that class only in a private header;libcstops compiling on macOS. The itanium specifics header already declares the other libc++abi type_info classes the same way.BasicString.cppoflibSceLibcInternaltakes the smaller of astd::size_tand thestd::uint64_tsize of the guest string (#17668). On macOS the first isunsigned longand the secondunsigned long long, sostd::mincannot deduce one type; both calls now clamp asstd::size_t, as #17532 did for the narrow helper.VulkanDevice.cppreadsenvironfor the device-fault report and gets it from no header on macOS; it declares it, as the non-Windows branch needs.Tested
macOS 27.0.1, Apple M3 Max (36 GB), Release build with
-DBUILD_TESTING=ON, x86_64 under Rosetta 2, onmain3b7f31fa7with the macOS port (the squash of #8658, which its author upstreams in parts).libc,libSceLibcInternalandlibSceAgcDrivercompile and link with the three changes (a full Release build of the tree, 9,248 build steps, no error).python3 tools/check_conventions.py --base origin/mainpasses. No open pull request changesBasicString.cppor the type_info header; many open pull requests touchVulkanDevice.cpp, and the added line sits in its include block.Not tested: Linux and Windows (the changes compile on libstdc++ and the MSVC-style ABIs unchanged:
std::size_tandstd::uint64_tare the same type there).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)