Build rustc and codegen backends with -Zembed-metadata=no - #151061
Conversation
This comment has been minimized.
This comment has been minimized.
Build rustc and codegen backends with -Zno-embed-metadata
|
And the baseline to compare the disk space against for try builds: @bors try |
Build rustc and codegen backends with -Zno-embed-metadata
This comment has been minimized.
This comment has been minimized.
|
r? @Kobzol |
6e25c8e to
b6605c3
Compare
|
For the try build it saves 2GB or 4% of the total space the build takes (46GB -> 44GB). Hoped it would be a bit more, but still not bad I think. And maybe it gives a higher relative saving when not collecting PGO profiles? @rustbot ready |
|
Let's do a full try build to see the codegen backend savings (we can compare them with the parent commit, should be enough), and also run perf., just in case. @bors try jobs=dist-x86_64-linux @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Build rustc and codegen backends with -Zno-embed-metadata try-job: dist-x86_64-linux
|
For cg_clif the |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (2cbe7f7): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 476.337s -> 475.884s (-0.10%) |
|
Before: After: And no other components seem to have changed their size. Yeah, pretty nice, a solid ~10%! |
158bff0 to
14dbf7e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Managed to reproduce it locally. Seems to be working now. I wasn't able to unconditionally pass |
cb2e7ce to
b61abad
Compare
|
@rustbot ready |
The run-make-support build code doesn't use run_cargo. Previously this would be skipped by the |
b61abad to
5e75882
Compare
|
Hmm, it's not just compiletest, rustdoc also breaks if we apply this everywhere: |
|
Looks like someone decided to add a dependency on rustc_public to rustc_driver. That would have to be the other way around for rustc_public to function without manually linking in rustc_driver as user of rustc_public. That said, I don't understand how that error you got would be triggered. Both librustc_public.rmeta and librustc_public.rlib should be included in the sysroot. |
|
Sorry, I tried this in a fresh checkout and didn't port your |
…ough, r=jieyouxu Explicitly pass run_make_support rlib/rmeta paths to compiletest This should unblock rust-lang#151061, and helps with rust-lang/cargo#17359 from the side of run-make-support. I tested this with `-Zembed-metadata=no` applied to everything (in `Builder::cargo`), it works now both with and without it (that's not to say that applying `-Zembed-metadata=no` won't break something else, ofc). CC @bjorn3 r? jieyouxu --- try-job: aarch64-apple-1 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: aarch64-msvc-1 try-job: x86_64-mingw-1 try-job: armhf-gnu
Rollup merge of #161102 - Kobzol:compiletest-runmake-passthrough, r=jieyouxu Explicitly pass run_make_support rlib/rmeta paths to compiletest This should unblock #151061, and helps with rust-lang/cargo#17359 from the side of run-make-support. I tested this with `-Zembed-metadata=no` applied to everything (in `Builder::cargo`), it works now both with and without it (that's not to say that applying `-Zembed-metadata=no` won't break something else, ofc). CC @bjorn3 r? jieyouxu --- try-job: aarch64-apple-1 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: aarch64-msvc-1 try-job: x86_64-mingw-1 try-job: armhf-gnu
Rollup merge of #161102 - Kobzol:compiletest-runmake-passthrough, r=jieyouxu Explicitly pass run_make_support rlib/rmeta paths to compiletest This should unblock #151061, and helps with rust-lang/cargo#17359 from the side of run-make-support. I tested this with `-Zembed-metadata=no` applied to everything (in `Builder::cargo`), it works now both with and without it (that's not to say that applying `-Zembed-metadata=no` won't break something else, ofc). CC @bjorn3 r? jieyouxu --- try-job: aarch64-apple-1 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: aarch64-msvc-1 try-job: x86_64-mingw-1 try-job: armhf-gnu
|
Could you please rebase this onto #161102, and apply it to everything in |
While this won't change much for rustc and rustc-dev, it should make codegen backends a bit smaller by omitting their crate metadata. In addition it should reduce disk usage while compiling.
5e75882 to
005f20e
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
You can r=me if CI passes. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
Hmm, there are some steps that run with in-tree Cargo even without |
|
@rustbot blocked |
View all comments
While this won't change much for rustc and rustc-dev, it should make codegen backends a bit smaller by omitting their crate metadata. In addition it should reduce disk usage while compiling.
Follow up to #145343