Skip to content

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

Merged
rust-bors[bot] merged 1 commit intorust-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 intorust-lang:mainfrom
bjorn3:cg_gcc_thin_lto_fallback

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Mar 6, 2026

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.
@bjorn3 bjorn3 added the A-gcc Things relevant to the [future] GCC backend label Mar 6, 2026
@rustbot rustbot 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
Copy link
Contributor

@antoyo antoyo left a comment

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
Member Author

bjorn3 commented Mar 6, 2026

@bors r=antoyo

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 6, 2026

📌 Commit 15e839e has been approved by antoyo

It is now in the queue for this repository.

@rust-bors rust-bors bot 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-bors bot 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-bors bot merged commit feeeea9 into rust-lang:main Mar 7, 2026
11 checks passed
@rustbot rustbot 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-gcc Things relevant to the [future] GCC backend S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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