Skip to content

Commit 0444226

Browse files
committed
[Flang-rt] Forward libomp-mod dependency for non-default runtime builds
Summary: Currently this is required to inject the dependnecy so the object is built when targeting OpenMP. This was only applied to the `runtime_register_default_target` which only applies to `LLVM_ENABLE_RUNTIMES`. The user could concievably do cross-compiling, or just manually specify the host architecture and it would then error.
1 parent cc6def4 commit 0444226

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/runtimes/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ function(runtime_register_target name)
320320
set(install-${runtime_name}-${name} install-${runtime_name})
321321
set(install-${runtime_name}-${name}-stripped install-${runtime_name}-stripped)
322322
list(APPEND ${name}_extra_targets ${runtime_name}-${name} install-${runtime_name}-${name} install-${runtime_name}-${name}-stripped)
323+
# We need the target 'libomp-mod' to run flang-rt OpenMP tests.
324+
if(${runtime_name} STREQUAL "openmp")
325+
list(APPEND ${name}_extra_targets "libomp-mod")
326+
endif()
323327
if(LLVM_INCLUDE_TESTS)
324328
set(check-${runtime_name}-${name} check-${runtime_name} )
325329
list(APPEND ${name}_test_targets check-${runtime_name}-${name})

0 commit comments

Comments
 (0)