Skip to content

Commit 71f8aed

Browse files
jhuber6Ankur-0429
authored andcommitted
[Offload] Fix missing dependency on `clang-nvlink-wrapper' (llvm#137033)
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.
1 parent 767e78e commit 71f8aed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ if(build_runtimes)
514514
list(APPEND extra_cmake_args "-DCMAKE_PROGRAM_PATH=${CMAKE_PROGRAM_PATH}")
515515
endif()
516516

517-
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
517+
# TODO: We need to consider passing it as '-DRUNTIMES_x86_64_LLVM_ENABLE_RUNTIMES'.
518+
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES OR "offload" IN_LIST LLVM_ENABLE_RUNTIMES)
518519
if (${LLVM_TOOL_FLANG_BUILD})
519520
message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang")
520521
set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang")
@@ -526,7 +527,7 @@ if(build_runtimes)
526527
# that all .mod files are also properly build.
527528
list(APPEND extra_deps "flang" "module_files")
528529
endif()
529-
foreach(dep opt llvm-link llvm-extract clang clang-offload-packager)
530+
foreach(dep opt llvm-link llvm-extract clang clang-offload-packager clang-nvlink-wrapper)
530531
if(TARGET ${dep})
531532
list(APPEND extra_deps ${dep})
532533
endif()

0 commit comments

Comments
 (0)