High memory use on Rust 1.51.0 with thin LTO and debuginfo #83911
Labels
A-LTO
Area: Link-time optimization (LTO)
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
I-compilemem
Issue: Problems and improvements with respect to memory usage during compilation.
P-high
High priority
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Rust 1.50.0 is able to link the example bellow using a few GB of memory, but 1.51.0/nightly needs at least 30 GB, at which point either I or the OOM killer has to abort it.
I wasn't able to reduce it beyond this, at least for now. Removing the unused dependency to reqwest, changing the LTO setting to false or fat, disabling debuginfo, or using
-Clinker-plugin-lto
are, each, enough to bring back the memory consumption to manageable levels.After being aborted by the OOM killer, this is the error message:
Meta
rustc --version --verbose
(stable):rustc --version --verbose
(nightly):The text was updated successfully, but these errors were encountered: