-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Duplication of libLLVM-*.so in the distributed rustc component. #70838
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.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-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.T-releaseRelevant to the release subteam, which will review and decide on the PR/issue.Relevant to the release subteam, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.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-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.T-releaseRelevant to the release subteam, which will review and decide on the PR/issue.Relevant to the release subteam, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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