This is an archive of the discontinued LLVM Phabricator instance.

[Libomptarget] Build the DeviceRTL BC using clang directly
ClosedPublic

Authored by jhuber6 on Jul 21 2022, 11:13 AM.

Details

Summary

Currently the bitcode library is build using the clang front-end
manually. This was originally done because we did not support device
only compilation. Now we support device only compilation, at least for a
single offloading toolchain, so we can instead use clang directly rather
than using the front-end. This saves us needing to define things like
aux_triple.

Diff Detail

Event Timeline

jhuber6 created this revision.Jul 21 2022, 11:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 11:13 AM
Herald added a subscriber: mgorny. · View Herald Transcript
jhuber6 requested review of this revision.Jul 21 2022, 11:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 11:13 AM
tianshilei1992 accepted this revision.Jul 21 2022, 11:33 AM

LGTM as long as it doesn't break anything.

This revision is now accepted and ready to land.Jul 21 2022, 11:33 AM

LGTM as long as it doesn't break anything.

Passed the tests on my machine, who knows with this setup we have though.
Side note: the CI machine for this always fails because it can't find -lomptarget.devicertl and I'm not sure why. I tried to reproduce it but no such luck, it passed fine. I'm somewhat tempted to just disable the LTO tests for x86 to make it happy.

An easy way to check this is sound would be llvm-dis | diff on the library before and after

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