Skip to content

Fallback to fat LTO for -Clto=thin in cg_gcc - #153503

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bjorn3:cg_gcc_thin_lto_fallback
Mar 7, 2026
Merged

Fallback to fat LTO for -Clto=thin in cg_gcc#153503
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
bjorn3:cg_gcc_thin_lto_fallback

Conversation

@bjorn3

Copy link
Copy Markdown
Member

Fallback to no LTO doesn't work in practice as Cargo asks rustc to produce LTO-only rlibs with -Clinker-plugin-lto without providing any indication if they will be used for thin or fat LTO, so we can't disable -Clinker-plugin-lto for ThinLTO when using cg_gcc.

r? @antoyo

Fallback to no LTO doesn't work in practice as Cargo asks rustc to
produce LTO-only rlibs with -Clinker-plugin-lto without providing any
indication if they will be used for thin or fat LTO, so we can't disable
-Clinker-plugin-lto for ThinLTO when using cg_gcc.
@bjorn3bjorn3 added the A-gcc Things relevant to the [future] GCC backend label Mar 6, 2026
@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 6, 2026

@antoyoantoyo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go with this and I'll adjust the test in the next sync and make sure we're good.

View changes since this review

@bjorn3

Copy link
Copy Markdown
MemberAuthor

@bors r=antoyo

@rust-bors

rust-borsBot commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 15e839e has been approved by antoyo

It is now in the queue for this repository.

@rust-borsrust-borsBot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 6, 2026
rust-borsBot pushed a commit that referenced this pull request Mar 7, 2026
…uwer
Rollup of 5 pull requests
Successful merges:
- #149937 (spliit out `linker-info` from `linker-messages`)
- #153503 (Fallback to fat LTO for -Clto=thin in cg_gcc)
- #153346 (move never type tests to subdirectories and add some comments)
- #153371 (Fix LegacyKeyValueFormat report from docker build: arm)
- #153508 (Clean up the eager formatting API)
@rust-bors
rust-borsBot merged commit feeeea9 into rust-lang:mainMar 7, 2026
11 checks passed
@rustbotrustbot added this to the 1.96.0 milestone Mar 7, 2026
rust-timer added a commit that referenced this pull request Mar 7, 2026
Rollup merge of #153503 - bjorn3:cg_gcc_thin_lto_fallback, r=antoyo
Fallback to fat LTO for -Clto=thin in cg_gcc
Fallback to no LTO doesn't work in practice as Cargo asks rustc to produce LTO-only rlibs with -Clinker-plugin-lto without providing any indication if they will be used for thin or fat LTO, so we can't disable -Clinker-plugin-lto for ThinLTO when using cg_gcc.
r? @antoyo
@bjorn3
bjorn3 deleted the cg_gcc_thin_lto_fallback branch March 9, 2026 09:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-gccThings relevant to the [future] GCC backendS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@bjorn3@antoyo@rustbot