[PATCH] D152973: Reland "[gold] Add preliminary FatLTO support to the Gold plugin""

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 14:20:11 PDT 2023


MaskRay added a subscriber: alexcrichton.
MaskRay added a comment.

In D152973#4529625 <https://reviews.llvm.org/D152973#4529625>, @paulkirth wrote:

> @peter.smith @nikic @maskray @tejohnson, given that Rust and others seem to use the `.llvmbc`, I see a few ways we can move forward here.
>
> 1. have a hard transition (e..g., this patch), and make downstream consumers adapt now.
> 2. have a soft transition, and mark `.llvmbc` as deprecated, then remove in the following release (so about 6 months from now).
> 3. forgo trying to separate the old uses of `.llvmbc` from new FatLTO uses and just reuse the `.llvmbc` section name.
> 4. ... something completely different?
>
> I'm not really sure what the best way to go about this would be. I'd lean towards a soft transition (2), since that seems more forgiving and less hostile towards downstream consumers, but I think there are merits for any of the approaches.  There are probably other options I haven't considered either, so thoughts and suggestions would be quite welcome.

If `-ffat-lto-objects` doesn't need to go to the LLVM 17.0.0 release, we can do a soft transition:

- Keep the LLVM and Clang parts in `release/17.x`
- Change Clang Driver `-ffat-lto-objects` back to the previous state that is ignored. So Clang 17 will still not support `-ffat-lto-objects`.
- Give some time for @peter.smith and https://github.com/rust-lang/rust/ to migrate to `.llvm.lto` . I am not familiar with rust-lang/rust, but it seems that @alexcrichton is involved in some changes. Note, giving some time for the downstream should be considered a courtesy, not a norm.

I am curious how downstream users perceive a breakage? Is any of `IRObjectFile::findBitcodeInObject`, `IRObjectFile::findBitcodeInMemBuffe`, `lto_module_is_object_file_for_target` used?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152973/new/

https://reviews.llvm.org/D152973



More information about the llvm-commits mailing list