Page MenuHomePhabricator

[clang] Preliminary fat-lto-object support
Needs ReviewPublic

Authored by paulkirth on Mar 23 2023, 5:56 PM.

Details

Summary

Fat LTO objects contain both LTO compatible IR, as well as generated
object code. This allows users to defer the choice of whether to use LTO
or not to link-time. This is a feature available in GCC for some time,
and makes the existing -ffat-lto-objects flag functional in the same
way as GCC's.

This patch adds support for that flag in the driver, as well as setting the
necessary codegen options for the backend. Largely, this means we select
the newly added pass pipeline for generating fat objects.

Users are expected to pass -ffat-lto-objects to clang in addition to one
of the -flto variants. Without the -flto flag, -ffat-lto-objects has no
effect.

Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977

Depends on D146776

Diff Detail

Event Timeline

paulkirth created this revision.Mar 23 2023, 5:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2023, 5:56 PM
paulkirth requested review of this revision.Mar 23 2023, 5:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2023, 5:56 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
paulkirth updated this revision to Diff 508773.Mar 27 2023, 1:16 PM
paulkirth retitled this revision from [clang] Preliminary fat-lot-object support to [clang] Preliminary fat-lto-object support.

Fix typo in title

Add relese note.