Since #57286, libLLVM-*.so has been distributed in the rustc component in two locations:
lib/libLLVM-*.so (presumably as a runtime dependency of bin/rustc)
lib/rustlib/$target/lib/libLLVM-*.so (not sure, maybe for linking custom drivers?)
- likely belongs in the
rustc-dev component, if the duplication can't be avoided
The difference can be seen in these consecutive nightlies' rustc components:
All 3 of those libLLVM-8svn.so files are identical (even across nightlies, yay for deterministic builds):
e400d157a7ceaee26f8680cb6f7430bd98c251dbb32e1f10549dda9f5769dc42 before/rustc-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-8svn.so
e400d157a7ceaee26f8680cb6f7430bd98c251dbb32e1f10549dda9f5769dc42 after/rustc-nightly-x86_64-unknown-linux-gnu/rustc/lib/libLLVM-8svn.so
e400d157a7ceaee26f8680cb6f7430bd98c251dbb32e1f10549dda9f5769dc42 after/rustc-nightly-x86_64-unknown-linux-gnu/rustc/lib/rustlib/x86_64-unknown-linux-gnu/lib/libLLVM-8svn.so
One fascinating aspect is that the size only increases from 82.22 MiB to 83.18 MiB, despite libLLVM-8svn.so alone being 67 MiB uncompressed, so compression is really helping.
Even the .tar.gz only goes from 111.41 MiB to 113.26 MiB.
(I'm using archive sizes from the 2019-01-06 and 2019-01-07 directory listings in https://static.rust-lang.org/dist, FWIW)
This part of the build system seems relevant, but I'm not sure which of the two this creates:
|
// Ensure that `libLLVM.so` ends up in the newly build compiler directory, |
|
// so that it can be found when the newly built `rustc` is run. |
|
dist::maybe_install_llvm_dylib(builder, target_compiler.host, &sysroot); |
cc @alexcrichton @rust-lang/release
Since #57286,
libLLVM-*.sohas been distributed in therustccomponent in two locations:lib/libLLVM-*.so(presumably as a runtime dependency ofbin/rustc)lib/rustlib/$target/lib/libLLVM-*.so(not sure, maybe for linking custom drivers?)rustc-devcomponent, if the duplication can't be avoidedThe difference can be seen in these consecutive nightlies'
rustccomponents:libLLVM-*.soRPATHbylib/rustlib/$target/codegen-backends/librustc_codegen_llvm-llvm.so? separate codegen backends are gone, maybe we should just try removing it?All 3 of those
libLLVM-8svn.sofiles are identical (even across nightlies, yay for deterministic builds):One fascinating aspect is that the size only increases from
82.22 MiBto83.18 MiB, despitelibLLVM-8svn.soalone being67 MiBuncompressed, so compression is really helping.Even the
.tar.gzonly goes from111.41 MiBto113.26 MiB.(I'm using archive sizes from the 2019-01-06 and 2019-01-07 directory listings in https://static.rust-lang.org/dist, FWIW)
This part of the build system seems relevant, but I'm not sure which of the two this creates:
rust/src/bootstrap/compile.rs
Lines 755 to 757 in 733f104
cc @alexcrichton @rust-lang/release