[libc-commits] [PATCH] D142774: [libc] Do not install to the default triple in GPU mode

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jan 27 10:14:49 PST 2023


jhuber6 created this revision.
jhuber6 added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142774

Files:
  libc/lib/CMakeLists.txt


Index: libc/lib/CMakeLists.txt
===================================================================
--- libc/lib/CMakeLists.txt
+++ libc/lib/CMakeLists.txt
@@ -11,7 +11,7 @@
 
 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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142774.492837.patch
Type: text/x-patch
Size: 493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230127/e881e469/attachment.bin>


More information about the libc-commits mailing list