[llvm] ebd6227 - [LLVM] Fix runtimes builds not triggering without LLVM_ENABLE_RUNTIMES (#94225)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 3 10:11:18 PDT 2024
Author: Joseph Huber
Date: 2024-06-03T12:11:14-05:00
New Revision: ebd62273782456d2adad29eb5ba8b8fbf609904e
URL: https://github.com/llvm/llvm-project/commit/ebd62273782456d2adad29eb5ba8b8fbf609904e
DIFF: https://github.com/llvm/llvm-project/commit/ebd62273782456d2adad29eb5ba8b8fbf609904e.diff
LOG: [LLVM] Fix runtimes builds not triggering without LLVM_ENABLE_RUNTIMES (#94225)
Summary:
The runtimes builds create separate projects. Normally these use
`LLVM_EANBLE_RUNTIMES`. However, we can also use `LLVM_RUNTIME_TARGETS`
and `RUNTIMES_<target>_LLVM_ENABLE_RUNTIMES` to enable them. Currently,
if `LLVM_RUNTIME_TARGETS` isn't specified this is completely ignored.
This patch fixes the behavior so we can only specify the cross-compiling
versions.
Added:
Modified:
llvm/runtimes/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 7fd4e61cc46e6..e60c9dd6041b4 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -430,7 +430,17 @@ function(runtime_register_target name)
endforeach()
endfunction()
+# Check if we have any runtimes to build.
if(runtimes)
+ set(build_runtimes TRUE)
+endif()
+foreach(name ${LLVM_RUNTIME_TARGETS})
+ if(RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES)
+ set(build_runtimes TRUE)
+ endif()
+endforeach()
+
+if(build_runtimes)
# Create a runtimes target that uses this file as its top-level CMake file.
# The runtimes target is a configuration of all the runtime libraries
# together in a single CMake invocation.
More information about the llvm-commits
mailing list