Skip to content

Commit cee08ff

Browse files
authored
[Libomptarget] Do not pass 'nogpulib' to the non-LTO Nvidia tests (#70327)
Summary: For the other tests we pass `-nogpulib` to ensure that we set up the needed libraries correctly. However, this caused problems for the non-LTO build and test of Nvidia systems. In general this is because we would do a separate compile of the libomptarget device runtime and then link in that cubin. This exercised the runtime in a lot of ways it's not used to, since doing things this way was hardly expected or tested. This patch disables it only for the Nvidia non-LTO build so that we still get the effect of `--liboimptarget-nvptx-bc-path` rather than ignoring it.
1 parent 166b3a8 commit cee08ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openmp/libomptarget/test/lit.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ elif config.operating_system == 'Darwin':
128128
config.test_flags += " -Wl,-rpath," + config.library_dir
129129
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
130130
else: # Unices
131-
config.test_flags += " -nogpulib"
131+
if config.libomptarget_current_target != "nvptx64-nvidia-cuda":
132+
config.test_flags += " -nogpulib"
132133
config.test_flags += " -Wl,-rpath," + config.library_dir
133134
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory
134135
config.test_flags += " -Wl,-rpath," + config.llvm_lib_directory

0 commit comments

Comments
 (0)