[llvm-branch-commits] [libcxx] Prepare libcxx and libcxxabi for pointer field protection. (PR #151651)

Louis Dionne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Dec 4 13:26:21 PST 2025


================
@@ -214,7 +214,11 @@ set(LIBCXX_LIBRARY_VERSION "${LIBCXX_ABI_VERSION}.0" CACHE STRING
    For example, -DLIBCXX_LIBRARY_VERSION=x.y will result in the library being named
    libc++.x.y.dylib, along with the usual symlinks pointing to that. On Apple platforms,
    this also controls the linker's 'current_version' property.")
-set(LIBCXX_ABI_NAMESPACE "__${LIBCXX_ABI_VERSION}" CACHE STRING "The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.")
+set(default_abi_namespace "__${LIBCXX_ABI_VERSION}")
+if(NOT LIBCXX_PFP STREQUAL "none")
----------------
ldionne wrote:

Why do you change the namespace when PFP is enabled? Because the ABI is different and you want to minimize the likelihood of ABI mismatches?

The right way to achieve this would be to set `LIBCXX_ABI_NAMESPACE` from the cache file that you use to build libc++ on the platform where PFP needs to coexist with non-PFP code. The libc++ build process itself shouldn't have to know about PFP.

https://github.com/llvm/llvm-project/pull/151651


More information about the llvm-branch-commits mailing list