[libcxx-commits] [PATCH] D119554: [compiler-rt] Force ABI to libcxxabi when building cxustom libc++

Dimitry Andric via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 11 09:09:24 PST 2022


dim created this revision.
dim added reviewers: phosek, ldionne, emaste, mtrofin.
Herald added subscribers: krytarowski, arichardson, mgorny, dberris.
dim requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

Follow-up to 458ead66dc37 <https://reviews.llvm.org/rG458ead66dc378ee5b9cbeb453a9cb7c3de768b2e>, which replaced the bespoke CMakeLists.txt
file for building a custom instrumented libc++ with an invocation of the
runtimes build.

In the the bespoke CMakeLists.txt, the LIBCXX_CXX_ABI setting was forced
to libcxxabi, but this was not done for the CMake invocation for the
runtimes build. This would cause CMake configuration issues on platforms
where the default LIBCXX_CXX_ABI setting is not libcxxabi, such as
FreeBSD.

Add `-DLIBCXX_CXX_ABI=libcxxabi` to that invocation, to make sure the
custom instrumented libc++ always uses the expected ABI.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119554

Files:
  compiler-rt/cmake/Modules/AddCompilerRT.cmake


Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
===================================================================
--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -635,6 +635,7 @@
                -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
                -DLLVM_PATH=${LLVM_MAIN_SRC_DIR}
                -DLLVM_ENABLE_RUNTIMES=libcxx|libcxxabi
+               -DLIBCXX_CXX_ABI=libcxxabi
                -DLIBCXXABI_ENABLE_SHARED=OFF
                -DLIBCXXABI_HERMETIC_STATIC_LIBRARY=ON
                -DLIBCXXABI_INCLUDE_TESTS=OFF


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119554.407905.patch
Type: text/x-patch
Size: 599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220211/d8863814/attachment-0001.bin>


More information about the libcxx-commits mailing list