This is an archive of the discontinued LLVM Phabricator instance.

[LTO][Doc] Document gotchas with LTO and libcalls.
Needs ReviewPublic

Authored by mysterymath on Oct 7 2022, 10:01 AM.

Details

Summary

The interaction of LTO and libcalls is subtle, and footguns abound.
Libcalls can cause lazy object files to be added to the link after LTO
code generation completes, which can cause issues if COFF/ELF dependent
libraries are used, or if the libcalls are implemented in bitcode.

This change documents the current state of affairs, along with
prescriptions for rules to follow to avoid undefined behavior.

Diff Detail

Event Timeline

mysterymath created this revision.Oct 7 2022, 10:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 10:01 AM
mysterymath requested review of this revision.Oct 7 2022, 10:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 10:01 AM

Just wanted to ping this; if we can't reasonably improve the semantic collision between LTO, deplibs, and libcalls, it seems like it should at least be written down somewhere.