This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Fix libomptarget tests to find libomp
AbandonedPublic

Authored by jdenny on Feb 5 2021, 4:27 PM.

Details

Summary

Without this patch, libomptarget tests fail to find libomp.so, whether
I configure openmp as part of LLVM_ENABLE_RUNTIMES or
LLVM_ENABLE_PROJECTS.

In the LLVM_ENABLE_PROJECTS case only, it's already possible to work
around the problem by setting LD_LIBRARY_PATH appropriately before
calling "ninja check-libomptarget". However, there was a time when
that wasn't necessary, and it seems like it shouldn't be.

Diff Detail

Event Timeline

jdenny created this revision.Feb 5 2021, 4:27 PM
jdenny requested review of this revision.Feb 5 2021, 4:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2021, 4:27 PM
Herald added a subscriber: sstefan1. · View Herald Transcript
tianshilei1992 added inline comments.Feb 5 2021, 4:37 PM
openmp/libomptarget/deviceRTLs/nvptx/test/lit.site.cfg.in
8 ↗(On Diff #321894)

We probably don't need an extra variable for that. config.omp_host_rtl_directory is for libomp if I'm not mistaken.

JonChesterfield resigned from this revision.Feb 5 2021, 5:02 PM

Thank you for looking at this. I can't tell whether the change is right, but it's definitely annoying to need to set env variables to run tests.

jdenny updated this revision to Diff 321904.Feb 5 2021, 5:42 PM
jdenny edited the summary of this revision. (Show Details)

Set LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER for non-standalone builds.

jdenny marked an inline comment as done.Feb 5 2021, 5:42 PM
jdenny added inline comments.
openmp/libomptarget/deviceRTLs/nvptx/test/lit.site.cfg.in
8 ↗(On Diff #321894)

Yep, that's better. Thanks.

This revision is now accepted and ready to land.Feb 5 2021, 7:03 PM
jdenny abandoned this revision.Feb 5 2021, 7:27 PM
jdenny marked an inline comment as done.

Ouch. I checked out master instead of main. This bug has already been fixed. Sorry for the noise.