From b8b557395f62c99d3e363aaf530a6e31f580e816 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 23 Apr 2025 13:10:43 -0500 Subject: [PATCH] [Offload] Fix missing dependency on `clang-nvlink-wrapper' Summary: It's possible that this won't be built in time for the runtimes build. Add this as a dependency. We will also need to make this future proof and loop over all the enabled targets, but that's a later update. --- llvm/runtimes/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 51433d1ec9831..670e3ae84870a 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -514,7 +514,8 @@ if(build_runtimes) list(APPEND extra_cmake_args "-DCMAKE_PROGRAM_PATH=${CMAKE_PROGRAM_PATH}") endif() - if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) + # TODO: We need to consider passing it as '-DRUNTIMES_x86_64_LLVM_ENABLE_RUNTIMES'. + if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES OR "offload" IN_LIST LLVM_ENABLE_RUNTIMES) if (${LLVM_TOOL_FLANG_BUILD}) message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang") set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang") @@ -526,7 +527,7 @@ if(build_runtimes) # that all .mod files are also properly build. list(APPEND extra_deps "flang" "module_files") endif() - foreach(dep opt llvm-link llvm-extract clang clang-offload-packager) + foreach(dep opt llvm-link llvm-extract clang clang-offload-packager clang-nvlink-wrapper) if(TARGET ${dep}) list(APPEND extra_deps ${dep}) endif()