Skip to content

Remove code for ThinLTO from cg_gcc#152566

Open
bjorn3 wants to merge 1 commit intorust-lang:mainfrom
bjorn3:cg_gcc_no_thin_lto
Open

Remove code for ThinLTO from cg_gcc#152566
bjorn3 wants to merge 1 commit intorust-lang:mainfrom
bjorn3:cg_gcc_no_thin_lto

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Feb 13, 2026

It was just a dummy implementation to workarround the fact that thin local lto is the default in rustc. By adding a thin_lto_supported thin local lto can be automatically disabled for cg_gcc, removing the need for this dummy implementation. This makes improvements to the LTO handling on the cg_ssa side a lot easier.

cc #rustc-codegen-gcc > thin LTO implementation
This should make the work on rust-lang/compiler-team#908 easier.

r? rust-lang/wg-gcc-backend

@bjorn3 bjorn3 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-LTO Area: Link-time optimization (LTO) A-gcc Things relevant to the [future] GCC backend labels Feb 13, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2026

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

rustc_macros::diagnostics was changed

cc @davidtwco, @TaKO8Ki, @JonathanBrouwer

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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 Feb 13, 2026
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch from 391291e to f5d451d Compare February 13, 2026 10:14
@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch from f5d451d to a7dc3b0 Compare February 13, 2026 10:40
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch 2 times, most recently from 9801a76 to 2c4a301 Compare February 13, 2026 11:30
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch from 2c4a301 to fe75297 Compare February 13, 2026 12:29
@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch from d73f5d4 to 810a137 Compare February 13, 2026 14:16
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch 2 times, most recently from 16bfc87 to 445a2d7 Compare February 13, 2026 15:18
It was just a dummy implementation to workarround the fact that thin
local lto is the default in rustc. By adding a thin_lto_supported thin
local lto can be automatically disabled for cg_gcc, removing the need
for this dummy implementation. This makes improvements to the LTO
handling on the cg_ssa side a lot easier.
@bjorn3 bjorn3 force-pushed the cg_gcc_no_thin_lto branch from 445a2d7 to 1d32b5d Compare February 13, 2026 15:30
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 A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-LTO Area: Link-time optimization (LTO) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic C-cleanup Category: PRs that clean code up or issues documenting cleanup. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants