fix(cmake): keep the SEH personalities out of libxml2's export set #18086
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18086"
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 eliasbruno124-dev on 2026-11-10T11:07:06Z.
What
With GCC whose exceptions are SEH, as MSYS2 ships it,
core/libs/CMakeLists.txtcallslink_libraries(windows_seh_personalities), and every later target gets the object library. Since #14421 that includesLibXml2, the bundled libxml2 thatcmake/LibXml2.cmakeadds forlibSceNKWebKitRequirements. libxml2'sinstall(EXPORT "LibXml2")then fails at generation:The Windows MSYS2 workflow stops at this configure step in its run of 2026-11-10 on
c387acefa8, the first scheduled run after #14421 was merged; the run before it started from572f7aa6d8, which predates that merge. It is the failure #12731 fixed fornghttp2_static.Remove
windows_seh_personalitiesfromLibXml2'sLINK_LIBRARIESandINTERFACE_LINK_LIBRARIESafter the subdirectory is added, with the looplibSceHttp2uses for nghttp2. libxml2 is C and needs no personality routine; the libraries that link it still get the object library throughlink_libraries. Where the target is not defined (DWARF toolchains, Linux, macOS), removing it from the lists changes nothing.#12994 proposes isolating bundled subprojects from inherited link libraries in general, for nghttp2, mbedtls and glslang. It was written before libxml2 was added and does not change
cmake/LibXml2.cmake. This is the targeted form already merged for nghttp2, so the MSYS2 build configures again now; if #12994 is merged, libxml2 can move to its helper there.Tested
Windows 11 Pro 10.0.26300, CMake 4.4.5, Ninja, Release,
BUILD_TESTING=ON, install rules on, submodules at the revisions of the tested commit. Two MSYS2 compilers, both with SEH exceptions: MINGW64 GCC 16.2.0-6 and UCRT64 GCC 16.2.0-6.main39bac5d055, MINGW64: configuration completes and generation fails with the error above.main70aab1bf93fails the same way.39bac5d055(cce56f2e92), MINGW64, same build directory and options: configuration and generation pass.cmake --build build --target LibXml2buildslibxml2.a. In the generated build graph,libxml2.ano longer depends on theSehPersonalitiesobject, likelibnghttp2.a, andlibSceNKWebKitRequirements.prxstill links it.core/libs/libs, the relinker and the test executables. One link step of the first pass,guest_jsc_trivial_returns_tests.exe, failed copyinglibSceJsc.prxtotests/while four other libSceJsc test executables linked at the same moment; a secondcmake --buildfinished without a failure.python tools/check_conventions.py --base origin/mainandgit diff --checkpass.Not tested:
ctest. The suite was not run on this machine, which was in use by other GPU work, so the tests of the UCRT64 build are left to CI. The MINGW64 build stops atlibc, whoseFileStream.hppcalls_fflush_nolock, which msvcrt does not declare; BUILD.md names UCRT64, so that is not a regression. Linux, macOS and WinLibs builds were not run.Overlap: none of the 1,986 open pull request heads fetched on 2026-11-10 changes
cmake/LibXml2.cmake; #12994 is the related one, as described above.tools/pr_overlap.py --branch fix/cmake-libxml2-seh-exportdid not finish on this machine (its diffs fetch blobs on demand in a partial clone, and the connection was dropped), so this comes from the file lists of those heads. The branch merges cleanly intomain2c41a032c6, which was not configured here.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)