Skip to content

Commit 8937174

Browse files
authored
[libc] Add an option to always build GPU loader utilities (#86040)
Summary: Right now it's difficult to build these utilities standalone becayse they're keyed off of the other GPU handling. if someone wants to *just* build these utilities it's not possible without setting up the runtimes build. Since we can't just build these by default add an option to enable it. We can't just use the handling like LIBC_HDRGEN does because this is only for the GPU build, which isn't fully set up until way later. So this is probably the easiest way to just allow people to build these tools even without a GPU build setup.
1 parent aa7e4ba commit 8937174

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ if(LLVM_LIBC_FULL_BUILD OR LLVM_LIBC_GPU_BUILD)
6161
endif()
6262
endif()
6363
# We will build the GPU utilities if we are not doing a runtimes build.
64-
if(LLVM_LIBC_GPU_BUILD AND NOT LLVM_RUNTIMES_BUILD)
64+
option(LIBC_BUILD_GPU_LOADER "Always build the GPU loader utilities" OFF)
65+
if(LIBC_BUILD_GPU_LOADER OR (LLVM_LIBC_GPU_BUILD AND NOT LLVM_RUNTIMES_BUILD))
6566
add_subdirectory(utils/gpu)
6667
endif()
6768

0 commit comments

Comments
 (0)