aboutsummaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2024-05-31 11:48:45 -0700
committerGitHub <noreply@github.com>2024-05-31 11:48:45 -0700
commited155f3f237a7e3a3e40a84d815225d27e83f0db (patch)
treeb53eadea31c3a076e0bd214f12240a3b6cee0102 /libcxxabi
parent435e5c10b0ea6cf2a9674760ef2f4977412386eb (diff)
downloadllvm-ed155f3f237a7e3a3e40a84d815225d27e83f0db.zip
llvm-ed155f3f237a7e3a3e40a84d815225d27e83f0db.tar.gz
llvm-ed155f3f237a7e3a3e40a84d815225d27e83f0db.tar.bz2
[runtimes] Correctly apply libdir subdir for multilib (#93354)
We weren't applying the libdir subdir to header directories but this is necessary for correctness when building e.g. ASan variant. This change also updates path construction logic accross all runtimes and ensures they're consistent.
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/CMakeLists.txt13
1 files changed, 7 insertions, 6 deletions
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index 86fe4a6..52ba52f 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -183,14 +183,15 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
"Path where built libc++abi runtime libraries should be installed.")
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ set(LIBCXXABI_TARGET_SUBDIR ${LLVM_DEFAULT_TARGET_TRIPLE})
+ if(LIBCXXABI_LIBDIR_SUBDIR)
+ string(APPEND LIBCXXABI_TARGET_SUBDIR /${LIBCXXABI_LIBDIR_SUBDIR})
+ endif()
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
- set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
+ set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LIBCXXABI_TARGET_SUBDIR})
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LIBCXXABI_TARGET_SUBDIR} CACHE STRING
"Path where built libc++abi libraries should be installed.")
- if(LIBCXX_LIBDIR_SUBDIR)
- string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
- string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
- endif()
+ unset(LIBCXXABI_TARGET_SUBDIR)
else()
if(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})