-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Debug build of libLLVM.so is enormous #67109
Copy link
Copy link
Closed as not planned
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.I-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Type
Fields
Give feedbackNo fields configured for issues without a type.
This isn't an issue with Rust per se - however, it has implications for people building the compiler.
The
libLLVM.soshipped with the Rust compiler (libLLVM-9-rust-1.41.0-nightly.soat the time of writing) is currently 80MB. While this seems incredibly large for a shared library, it's still only slightly larger thanlibrustc_driver(63MB).This is unfortunate, but things become much worse when
llvm.release-debuginfo=trueis set inconfig.toml.This makeslibLLVM-9-rust-1.41.0-dev-de1a7dbf6.sotake up 2.1 GB of space.To make matters worse, we currently copy
libLLVM.soto a target directory when building the compiler:rust/src/bootstrap/dist.rs
Line 2167 in ae1b871
With #67077, we may have to copy it into even more places. This represents a non-trivial amount of disk space.
I don't think there's much we can directly do about the size of
libLLVM.so, other than making sure upstream is aware of this. However, we might want to consider symlinkinglibLLVM.so, rather than copying it. I know this works for shared libraries on Linux, but I'm not sure about other platforms.