[libc-commits] [libc] [llvm] [libc] Build the GPU during the projects setup like libc-hdrgen (PR #84667)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Sun Mar 10 05:43:34 PDT 2024


================
@@ -60,6 +60,10 @@ if(LLVM_LIBC_FULL_BUILD OR LLVM_LIBC_GPU_BUILD)
     message(STATUS "Will use ${LIBC_HDRGEN_EXE} for libc header generation.")
   endif()
 endif()
+# We will build the GPU utilities if we are not doing a runtimes build.
+if((LIBC_TARGET_OS_IS_GPU OR LLVM_LIBC_GPU_BUILD) AND NOT LLVM_RUNTIMES_BUILD)
----------------
jhuber6 wrote:

Because in a full cross-compiling build we don't necessarily have access to the LLVM and CUDA libraries that it requires. I already have around `find_package(CUDA)` and `find_package(LLVM)` but it wasn't a sound solution. This is pretty much the same reason we don't build `libc-hdrgen` during the runtimes build.

https://github.com/llvm/llvm-project/pull/84667


More information about the libc-commits mailing list