Skip to content

Commit ebd6227

Browse files
authored
[LLVM] Fix runtimes builds not triggering without LLVM_ENABLE_RUNTIMES (llvm#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.
1 parent 2f8675a commit ebd6227

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,17 @@ function(runtime_register_target name)
430430
endforeach()
431431
endfunction()
432432

433+
# Check if we have any runtimes to build.
433434
if(runtimes)
435+
set(build_runtimes TRUE)
436+
endif()
437+
foreach(name ${LLVM_RUNTIME_TARGETS})
438+
if(RUNTIMES_${name}_LLVM_ENABLE_RUNTIMES)
439+
set(build_runtimes TRUE)
440+
endif()
441+
endforeach()
442+
443+
if(build_runtimes)
434444
# Create a runtimes target that uses this file as its top-level CMake file.
435445
# The runtimes target is a configuration of all the runtime libraries
436446
# together in a single CMake invocation.

0 commit comments

Comments
 (0)