This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget] Set runpath on libomptarget, use that to drop LD_LIBRARY_PATH from test runner
ClosedPublic

Authored by JonChesterfield on Sep 1 2021, 9:36 AM.

Details

Summary

Using rpath instead of LD_LIBRARY_PATH to find libomp.so and
libomptarget.so lets one rerun the already built test executables without
setting environment variables and removes the risk of the test runner picking
up different libraries to the developer debugging the failure.

rpath usually means runpath, which is not transitive, so set runpath on
libomptarget itself so that it can find the plugins located next to it,
spelled $ORIGIN. This provides sufficient functionality to drop D102043

Diff Detail

Event Timeline

JonChesterfield created this revision.Sep 1 2021, 9:36 AM
JonChesterfield requested review of this revision.Sep 1 2021, 9:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 9:36 AM

This solution is quite neat and much simpler than D102043, in line with what we want. LGTM, waiting for other people's opinions.

tianshilei1992 accepted this revision.Sep 1 2021, 10:14 AM

This is the right direction for tests. LGTM.

This revision is now accepted and ready to land.Sep 1 2021, 10:14 AM