Skip to content

Commit 8c1b0c8

Browse files
committed
Detect runtime build of the OpenMP runtime
Inspired by #88914
1 parent 8052b32 commit 8c1b0c8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flang/test/lit.site.cfg.py.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ config.cc = "@CMAKE_C_COMPILER@"
2525
config.osx_sysroot = path(r"@CMAKE_OSX_SYSROOT@")
2626
config.targets_to_build = "@TARGETS_TO_BUILD@"
2727
config.default_sysroot = "@DEFAULT_SYSROOT@"
28-
config.have_openmp_rtl = ("@LLVM_TOOL_OPENMP_BUILD@" == "TRUE")
28+
config.have_openmp_rtl = ("@LLVM_TOOL_OPENMP_BUILD@" == "TRUE") or ("openmp" in "@LLVM_ENABLE_RUNTIMES@".lower().split(";"))
29+
if "openmp" in "@LLVM_ENABLE_RUNTIMES@".lower().split(";"):
30+
config.openmp_module_dir = "@CMAKE_BINARY_DIR@/runtimes/runtimes-bins/openmp/runtime/src"
31+
else:
32+
config.openmp_module_dir = None
2933
config.flang_runtime_f128_math_lib = "@FLANG_RUNTIME_F128_MATH_LIB@"
3034

3135
import lit.llvm

0 commit comments

Comments
 (0)