This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Unconditionally link the OpenMP device RTL static library
ClosedPublic

Authored by jhuber6 on Jan 24 2023, 9:21 AM.

Details

Summary

Currently we have two versions of the static library. One is built as
individual bitcode files and linked via -mlink-builtin-bitcode. The
other is built as a single static archive omptarget.devicertl.a and is
linked via -lomptarget.devicertl and handled by the linker wrapper
during LTO. We use the former in the case that we are not performing
LTO, because linking the library late wouldn't allow us to optimize the
runtime library effectively. The support in D142484 allows us to
unconditionally link this library, so it will only be pulled in if
needed. That is, if we linked already via -mlink-builtin-bitcode then
we will not pull in the static library even if it's linked on the
command line.

Depends on D142484

Diff Detail

Event Timeline

jhuber6 created this revision.Jan 24 2023, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 9:21 AM
jhuber6 requested review of this revision.Jan 24 2023, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 9:21 AM
This revision is now accepted and ready to land.Jan 24 2023, 2:34 PM
This revision was landed with ongoing or failed builds.Jan 24 2023, 3:01 PM
This revision was automatically updated to reflect the committed changes.