-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
This isn't an issue with Rust per se - however, it has implications for people building the compiler.
The libLLVM.so shipped with the Rust compiler (libLLVM-9-rust-1.41.0-nightly.so at the time of writing) is currently 80MB. While this seems incredibly large for a shared library, it's still only slightly larger than librustc_driver (63MB).
This is unfortunate, but things become much worse when llvm.release-debuginfo=true is set in config.toml. This makes libLLVM-9-rust-1.41.0-dev-de1a7dbf6.so take up 2.1 GB of space.
To make matters worse, we currently copy libLLVM.so to a target directory when building the compiler:
Line 2167 in ae1b871
| builder.install(&llvm_dylib_path, &dst_libdir, 0o644); |
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 symlinking libLLVM.so, rather than copying it. I know this works for shared libraries on Linux, but I'm not sure about other platforms.