This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Make the plugins link as LLVM libraries
ClosedPublic

Authored by jhuber6 on Jul 21 2022, 6:06 AM.

Details

Summary

Previously we made libomptarget link as an LLVM library so we have
access to the LLVM core libraries. After the initial patch stuck we can
now apply the same changes to the plugins. This will allow us to use
LLVM in all of libomptarget when we have uses for them. In the future
this should allow us to remove the dependencies on libelf, libffi,
and dl.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 21 2022, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 6:06 AM
jhuber6 requested review of this revision.Jul 21 2022, 6:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 6:06 AM
JonChesterfield accepted this revision.Jul 21 2022, 6:23 AM

LGTM, thanks! Hopefully CI will be easier this time around.

This revision is now accepted and ready to land.Jul 21 2022, 6:23 AM
tianshilei1992 added inline comments.Jul 21 2022, 7:29 AM
openmp/libomptarget/plugins/ve/CMakeLists.txt
43

why do we need NO_INSTALL_RPATH here but later set its property separately?

jhuber6 added inline comments.Jul 21 2022, 7:32 AM
openmp/libomptarget/plugins/ve/CMakeLists.txt
43

I'm not exactly sure, that was a configuration the AMD people gave me that finally made it stop breaking on their CI system. I think we need to manually set it to the libomptarget install as well whereas that one would set it to the one that goes in /build/lib. Ideally in the future we'd just put everything in the same library instead of duplicating it, but getting these configurations right is pretty finicky.

tianshilei1992 added inline comments.Jul 21 2022, 7:37 AM
openmp/libomptarget/plugins/ve/CMakeLists.txt
43

That doesn't look good. Is there any argument provided by add_llvm_library could do something similar, instead of having completely contrary setting?

jhuber6 added inline comments.Jul 21 2022, 7:39 AM
openmp/libomptarget/plugins/ve/CMakeLists.txt
43

Not sure, I think the NO_INSTALL_RPATH only applies to the one installed under the /lib directory and not the one we manually install. it worked on my machine without the rpath / installation business but the only buildbot we have didn't like it. If I had access to the machine I could try to figure it out but I'm not really interested in pushing and reverting commits until it's happy.

tianshilei1992 added inline comments.Jul 21 2022, 7:59 AM
openmp/libomptarget/plugins/ve/CMakeLists.txt
43

The script used by those systems are available right?

This revision was landed with ongoing or failed builds.Jul 22 2022, 6:34 AM
This revision was automatically updated to reflect the committed changes.