From f14cde37ccdde4a3b4032af4d839ece405e78d8f Mon Sep 17 00:00:00 2001 From: TB Schardl Date: Sun, 3 Nov 2024 16:18:49 -0500 Subject: [PATCH] [runtimes] Make sure that llvm-link is available to build cheetah or cilktools with LLVM runtimes. --- llvm/runtimes/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index 6a7cc504c0db..e140cebb5fec 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -418,6 +418,13 @@ if(runtimes) # The runtimes target is a configuration of all the runtime libraries # together in a single CMake invocation. set(extra_deps "") + if("cheetah" IN_LIST LLVM_ENABLE_RUNTIMES OR "cilktools" IN_LIST LLVM_ENABLE_RUNTIMES) + foreach(dep llvm-link clang) + if(TARGET ${dep}) + list(APPEND extra_deps ${dep}) + endif() + endforeach() + endif() if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES) foreach(dep opt llvm-link llvm-extract clang clang-offload-packager) if(TARGET ${dep} AND OPENMP_ENABLE_LIBOMPTARGET)