libc++ documentation of LIBCXX_CXX_ABI_LIBNAME wrong?

It appears that the option LIBCXX_CXX_ABI_LIBNAME is incorrectly mentioned repeatedly as LIBCXX_CXX_ABI on this webpage: https://libcxx.llvm.org/docs/BuildingLibcxx.html#abi-library-specific-options

The build wasn’t working for me until I looked into the cmake module and noticed that it was checking the longer name.

I do think the documentation is correct. libcxx/CMakeLists.txt:166 actually sets LIBCXX_CXX_ABI_LIBNAME from LIBCXX_CXX_ABI. My understanding is that LIBCXX_CXX_ABI_LIBNAME is an internal variable and LIBCXX_CXX_ABI is the (documented) user-facing setting. I can take a look if you can provide a reproducer (setting LIBCXX_CXX_ABI and it not working).

Louis

Yes, I realized belatedly that this is the case. I was led astray by things not working (see other, later post that you already responded to), and because the build was telling me that the LIBNAME variable wasn’t being used. I’ve switched to using ccmake to set variables now (thanks to a helpful video about building this toolchain), and hopefully that reduces missteps.

Yes, the CMake variable to use is LIBCXX_CXX_ABI. For FreeBSD, I always set it to -D LIBCXX_CXX_ABI=libcxxrt, and optionally I also set -D LIBCXX_CXX_ABI_INCLUDE_PATHS.

-Dimitry