Skip to content

Commit b69ca96

Browse files
hvdijkgithub-actions[bot]
authored andcommitted
Automerge: [libclc] Add missing deps for LLVM_ENABLE_RUNTIMES. (#145684)
When libclc is built using LLVM_ENABLE_RUNTIMES, we need all tools to be available before starting the runtime build. Add the missing deps for this.
2 parents b99b5e9 + 183ff08 commit b69ca96

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,13 @@ if(build_runtimes)
510510
endif()
511511

512512
# TODO: We need to consider passing it as '-DRUNTIMES_x86_64_LLVM_ENABLE_RUNTIMES'.
513+
if("libclc" IN_LIST LLVM_ENABLE_RUNTIMES)
514+
foreach(dep clang llvm-as llvm-link opt)
515+
if(TARGET ${dep})
516+
list(APPEND extra_deps ${dep})
517+
endif()
518+
endforeach()
519+
endif()
513520
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES OR "offload" IN_LIST LLVM_ENABLE_RUNTIMES)
514521
if (${LLVM_TOOL_FLANG_BUILD})
515522
message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang")

0 commit comments

Comments
 (0)