[libcxx-commits] [libcxx] bcaa017 - [libc++] Fix linking libc++abi in standalone builds
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 2 06:36:51 PDT 2020
Author: Raul Tambre
Date: 2020-04-02T09:36:33-04:00
New Revision: bcaa01752f5e45b9d1647aef16d74c748192f8a5
URL: https://github.com/llvm/llvm-project/commit/bcaa01752f5e45b9d1647aef16d74c748192f8a5
DIFF: https://github.com/llvm/llvm-project/commit/bcaa01752f5e45b9d1647aef16d74c748192f8a5.diff
LOG: [libc++] Fix linking libc++abi in standalone builds
In standalone builds the cxxabi_shared and cxxabi_static targets don't exist.
We need to link against the library itself.
Differential Revision: https://reviews.llvm.org/D77294
Added:
Modified:
libcxx/cmake/Modules/HandleLibCXXABI.cmake
Removed:
################################################################################
diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
index 3cd9481de9c1..2cdf82225ad6 100644
--- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -103,9 +103,18 @@ if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
)
elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi")
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_SOURCE_DIR}/../libcxxabi/include")
+
+ if(LIBCXX_STANDALONE_BUILD)
+ set(shared c++abi)
+ set(static c++abi)
+ else()
+ set(shared cxxabi_shared)
+ set(static cxxabi_static)
+ endif()
+
setup_abi_lib(
"-DLIBCXX_BUILDING_LIBCXXABI"
- "cxxabi_shared" "cxxabi_static" "cxxabi.h;__cxxabi_config.h" "")
+ "${shared}" "${static}" "cxxabi.h;__cxxabi_config.h" "")
elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt")
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
setup_abi_lib(
More information about the libcxx-commits
mailing list