[llvm] [offload] Fix finding libomptarget in runtimes build (PR #157856)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 06:29:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Michał Górny (mgorny)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/157856.diff
1 Files Affected:
- (modified) offload/test/lit.cfg (+2)
``````````diff
diff --git a/offload/test/lit.cfg b/offload/test/lit.cfg
index a41bcb9c0d064..c0290bfdab3ff 100644
--- a/offload/test/lit.cfg
+++ b/offload/test/lit.cfg
@@ -83,6 +83,7 @@ config.test_format = lit.formats.ShTest()
config.test_flags = " -I " + config.test_source_root + \
" -I " + config.omp_header_directory + \
" -L " + config.library_dir + \
+ " -L " + config.llvm_library_intdir + \
" -L " + config.llvm_lib_directory
# compiler specific flags
@@ -165,6 +166,7 @@ else: # Unices
config.test_flags += " -nogpulib"
config.test_flags += " -Wl,-rpath," + config.library_dir
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
+ config.test_flags += " -Wl,-rpath," + config.llvm_library_intdir
config.test_flags += " -Wl,-rpath," + config.llvm_lib_directory
if config.cuda_libdir:
config.test_flags += " -Wl,-rpath," + config.cuda_libdir
``````````
</details>
https://github.com/llvm/llvm-project/pull/157856
More information about the llvm-commits
mailing list