[libc-commits] [libc] 8583291 - [libc] Do not install to the default triple in GPU mode
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Fri Jan 27 12:06:10 PST 2023
Author: Joseph Huber
Date: 2023-01-27T14:06:00-06:00
New Revision: 8583291dfc43f5769291d8e70d84125154e61341
URL: https://github.com/llvm/llvm-project/commit/8583291dfc43f5769291d8e70d84125154e61341
DIFF: https://github.com/llvm/llvm-project/commit/8583291dfc43f5769291d8e70d84125154e61341.diff
LOG: [libc] Do not install to the default triple in GPU mode
Currently this logic causes the `libcgpu.a` to be installed to the
user's default triple. The GPU target isn't really true to this in a
cross-compiling sense so we should just default to the regular `/lib`
directory
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D142774
Added:
Modified:
libc/lib/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index 86246b8b583d6..c91097d5bc7a7 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -11,7 +11,7 @@ set_target_properties(
if(LIBC_TARGET_TRIPLE)
set(LIBC_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LIBC_TARGET_TRIPLE})
-elseif(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+elseif(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT LIBC_GPU_BUILD)
set(LIBC_INSTALL_LIBRARY_DIR
lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
else()
More information about the libc-commits
mailing list