diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt index 9fe6f8c6b9c21..729797aa43f0b 100644 --- a/llvm/tools/CMakeLists.txt +++ b/llvm/tools/CMakeLists.txt @@ -9,7 +9,7 @@ # traversing each directory. create_llvm_tool_options() -if(NOT LLVM_COMPILER_IS_GCC_COMPATIBLE) +if(NOT LLVM_COMPILER_IS_GCC_COMPATIBLE OR NOT LLVM_LIBC_GPU_BUILD) set(LLVM_TOOL_LLVM_GPU_LOADER_BUILD OFF) endif()