Skip to content

Commit 312b561

Browse files
authored
[offload] Fix finding libomptarget in runtimes build (#157856)
Per the logic in top-level CMakeLists, `libomptarget` is placed into `LLVM_LIBRARY_OUTPUT_INTDIR` when this variable is set. Adjust the test logic to include this directory in `-L` and `-Wl,-rpath` arguments as well, in order to fix finding tests when building via the `runtimes` top-level directory. Signed-off-by: Michał Górny <[email protected]>
1 parent d070960 commit 312b561

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

offload/test/lit.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ config.test_format = lit.formats.ShTest()
8383
config.test_flags = " -I " + config.test_source_root + \
8484
" -I " + config.omp_header_directory + \
8585
" -L " + config.library_dir + \
86+
" -L " + config.llvm_library_intdir + \
8687
" -L " + config.llvm_lib_directory
8788

8889
# compiler specific flags
@@ -165,6 +166,7 @@ else: # Unices
165166
config.test_flags += " -nogpulib"
166167
config.test_flags += " -Wl,-rpath," + config.library_dir
167168
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
169+
config.test_flags += " -Wl,-rpath," + config.llvm_library_intdir
168170
config.test_flags += " -Wl,-rpath," + config.llvm_lib_directory
169171
if config.cuda_libdir:
170172
config.test_flags += " -Wl,-rpath," + config.cuda_libdir

0 commit comments

Comments
 (0)