diff --git a/packages/fabric/CHANGELOG.md b/packages/fabric/CHANGELOG.md index 1a073843aa..6fe3bf2bba 100644 --- a/packages/fabric/CHANGELOG.md +++ b/packages/fabric/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [Unreleased] + +### Removed + +- The CMake package config no longer publishes `QVAC_FABRIC_ABI_VERSION` or + `QVAC_FABRIC_OWNS_CXX_RUNTIME`. Both described the platform they were + configured for, and the config is not per-platform: it installs to + `share/qvac-fabric/cmake`, which every prebuild leg writes, and the artifact + merge keeps one copy in the published package. So the pair described whichever + leg finished last — `ON` from either Linux leg, `OFF` from Android, empty from + darwin, iOS or win32 — and a consumer had no way to tell a value meant for it + from one that was not. `0.16.0` shipped `ON` by that ordering rather than by + construction, and `0.16.1` still published them. + + Consumers asserting the pin read the node, and whether this build exports a + runtime to pin to at all, out of the `.bare` for their own triplet instead; + `__cxa_throw` is either defined there under a version node or it is not. The + in-tree addon template moved to that before this removal, so nothing in the + repository reads either variable. `QVAC_FABRIC_ABI_VERSION` remains as a build + variable, stamped onto the version node so the name and the script cannot + drift. + ## [0.16.1] - 2026-09-17 ### Fixed diff --git a/packages/fabric/CMakeLists.txt b/packages/fabric/CMakeLists.txt index 0283492a05..2c27ecd223 100644 --- a/packages/fabric/CMakeLists.txt +++ b/packages/fabric/CMakeLists.txt @@ -224,26 +224,17 @@ endif() # to keep the host's libstdc++ from answering for that C++ ABI, so the links # without the block keep the anonymous node symbols.map ships. if(UNIX AND NOT APPLE) - # Whether consumers should expect to import their C++ runtime from this - # module. True only for the link that embeds libc++; Android links - # libc++_shared.so and the ASan build links libc++.so.1, so there the runtime - # is shared by other means and a consumer that pinned it here would find - # nothing to pin. Published through the package config so the addon template - # can tell "fabric does not own the runtime" apart from "fabric is too old". - if(QVAC_FABRIC_LIBCXX_ARCHIVE) - set(QVAC_FABRIC_OWNS_CXX_RUNTIME ON) - else() - set(QVAC_FABRIC_OWNS_CXX_RUNTIME OFF) - endif() # symbols.map ships anonymous, which is what the links above need. The link # that owns the C++ runtime gets the ABI block spliced in and the node named, # the two halves of the same guarantee: the name is what makes consumers # record a DT_VERNEED, and the DT_VERNEED is what keeps the host's libstdc++ # from answering for the block. symbols.map carries the full rationale. set(_fabric_version_script "${CMAKE_CURRENT_SOURCE_DIR}/symbols.map") - if(QVAC_FABRIC_OWNS_CXX_RUNTIME) - # Declared here so the name reaches consumers through the package config. - # This is its only definition: the script below is stamped from it. + if(QVAC_FABRIC_LIBCXX_ARCHIVE) + # Named here so the script below can be asserted against it and the two + # cannot drift. Build-internal: consumers read the node they have to pin to + # off this module's exports, not off anything published here, because the + # package config is shared by every platform's prebuild leg. set(QVAC_FABRIC_ABI_VERSION "QVAC_FABRIC_ABI_1") set(_fabric_cxx_runtime_map "${CMAKE_CURRENT_SOURCE_DIR}/symbols-linux-cxx-runtime.map") @@ -277,11 +268,6 @@ if(UNIX AND NOT APPLE) file(WRITE "${_fabric_version_script}" "${_fabric_symbols}") set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/symbols.map" "${_fabric_cxx_runtime_map}") - else() - # Nothing to publish: this link's node stays anonymous, so a consumer has no - # version to record a DT_VERNEED on. Empty rather than unset so the package - # config says "this build shares its runtime" instead of going missing. - set(QVAC_FABRIC_ABI_VERSION "") endif() target_link_options(${qvac-fabric}_module PRIVATE -Wl,--version-script=${_fabric_version_script}) diff --git a/packages/fabric/cmake/qvac-fabricConfig.cmake.in b/packages/fabric/cmake/qvac-fabricConfig.cmake.in index 44a9fb6754..cfbea7fbeb 100644 --- a/packages/fabric/cmake/qvac-fabricConfig.cmake.in +++ b/packages/fabric/cmake/qvac-fabricConfig.cmake.in @@ -2,18 +2,13 @@ include("${CMAKE_CURRENT_LIST_DIR}/qvac-fabricTargets.cmake") -# The ELF version node this build stamped on its exports, empty on platforms -# that use no version script. A consumer linking the module with -nostdlib++ -# must end up with a DT_VERNEED on this version for every C++ runtime symbol it -# imports; without one, the dynamic linker satisfies them from whichever C++ -# runtime the host process loaded first, and typed catches across the fabric -# boundary stop matching. See arch/qips/linux-fabric-libcxx-ownership.md. -set(QVAC_FABRIC_ABI_VERSION "@QVAC_FABRIC_ABI_VERSION@") - -# Whether this build embeds and exports the C++ runtime for its consumers to -# import. OFF where a shared libc++ provides it instead (Android, the ASan -# build) and on the non-ELF platforms. Always defined, so a consumer can tell -# that apart from an older fabric whose config predates these variables. -set(QVAC_FABRIC_OWNS_CXX_RUNTIME "@QVAC_FABRIC_OWNS_CXX_RUNTIME@") +# Nothing platform-dependent belongs in this file. It installs to +# share/qvac-fabric/cmake, which every prebuild leg writes and the artifact +# merge collapses to a single copy in the published package, so a value that +# differs per platform would describe whichever leg finished last -- and a +# consumer reading it would be wrong without any way to tell. Keep it to facts +# that hold for every triplet; a consumer that needs to know how this build +# links its C++ runtime reads that out of the module for its own triplet, the +# way cmake/qvac-addon/assert-fabric-cxx-runtime.cmake does. check_required_components(qvac-fabric)