[compiler-rt] a9f1a9c - [compiler-rt] Force ABI to libcxxabi when building cxustom libc++

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 13:13:58 PST 2022


Author: Dimitry Andric
Date: 2022-02-11T22:12:54+01:00
New Revision: a9f1a9c00af3badc991028b313fcc701599c8ac2

URL: https://github.com/llvm/llvm-project/commit/a9f1a9c00af3badc991028b313fcc701599c8ac2
DIFF: https://github.com/llvm/llvm-project/commit/a9f1a9c00af3badc991028b313fcc701599c8ac2.diff

LOG: [compiler-rt] Force ABI to libcxxabi when building cxustom libc++

Follow-up to 458ead66dc37, 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.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D119554

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index b69833cbcc09b..4a496fc18f657 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -638,6 +638,7 @@ macro(add_custom_libcxx name prefix)
                -DLIBCXXABI_ENABLE_SHARED=OFF
                -DLIBCXXABI_HERMETIC_STATIC_LIBRARY=ON
                -DLIBCXXABI_INCLUDE_TESTS=OFF
+               -DLIBCXX_CXX_ABI=libcxxabi
                -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
                -DLIBCXX_ENABLE_SHARED=OFF
                -DLIBCXX_HERMETIC_STATIC_LIBRARY=ON


        


More information about the llvm-commits mailing list