Summary: The libc build has a few utilties that need to be built before we can do everything in the full build. The one requirement currently is the `libc-hdrgen` binary. If we are doing a full build runtimes mode we first add `libc` to the projects list and then only use the `projects` portion to buld the `libc` portion. We also use utilities for the GPU build, namely the loader utilities. Previously we would build these tools on-demand inside of the cross-build, which tool some hacky workarounds for the dependency finding and target triple. This patch instead just builds them similarly to libc-hdrgen and then passses them in. We now either pass it manually it it was built, or just look it up like we do with the other `clang` tools. Depends on https://github.com/llvm/llvm-project/pull/84664
16 lines
388 B
CMake
16 lines
388 B
CMake
add_executable(nvptx-loader Loader.cpp)
|
|
|
|
if(NOT LLVM_ENABLE_RTTI)
|
|
target_compile_options(nvptx-loader PRIVATE -fno-rtti)
|
|
endif()
|
|
target_include_directories(nvptx-loader PRIVATE
|
|
${LLVM_MAIN_INCLUDE_DIR} ${LLVM_BINARY_DIR}/include)
|
|
target_link_libraries(nvptx-loader
|
|
PRIVATE
|
|
gpu_loader
|
|
llvmlibc_rpc_server
|
|
CUDA::cuda_driver
|
|
LLVMObject
|
|
LLVMSupport
|
|
)
|