LTO build emits debug symbols even with debug disabled #43392
Labels
A-debuginfo
Area: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bug
Category: This is a bug.
Even when building with
opt-level=3
anddebug=false
, rustc emits binaries with debug symbols.I was experimenting with building a binary using
no_std
. MyCargo.toml
looked like this:main.rs
:When built, this resulted in a 28408-byte binary. Checking with objdump showed the majority of that space in debug sections:
strip
removed these (along with the symbol tables) and resulted in a 6040-byte binary.I can reproduce this with nightly 1.20 from commit ae98ebf (for the example above), stable 1.17 (with a std-based hello world example), and stable 1.18 (likewise).
The text was updated successfully, but these errors were encountered: