-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Use split-debuginfo = "unpacked"
for debug builds
#10516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Out of interest, do you know why |
I'm not sure, I think it would be up to cargo to make that change but I can't see anything about unpacked on linux in their issue list |
@bors r+ That sounds like a really nice improvement. The Clippy target dir is responsible for 9.5% of the file sizes in my |
Use `split-debuginfo = "unpacked"` for debug builds On Windows this has no effect as it's unsupported. On macOS the default set by cargo is already unpacked so no effect there either For Linux it shaves a bit off the rebuild time, for me in the case of a simple `touch` + `cargo build` it goes from 12s to 10s It saves a good amount of disk space too, on `aarch64-unknown-linux-gnu` it saves 1.2GB for a plain `cargo build`, 3GB when also running `cargo dev` and `cargo test --no-run -F internal` r? `@flip1995` changelog: none
💔 Test failed - checks-action_test |
43f8859
to
a90e5cc
Compare
The extra files in |
Thanks! @bors r+ |
Use `split-debuginfo = "unpacked"` for debug builds On Windows this has no effect as it's unsupported. On macOS the default set by cargo is already unpacked so no effect there either For Linux it shaves a bit off the rebuild time, for me in the case of a simple `touch` + `cargo build` it goes from 12s to 10s It saves a good amount of disk space too, on `aarch64-unknown-linux-gnu` it saves 1.2GB for a plain `cargo build`, 3GB when also running `cargo dev` and `cargo test --no-run -F internal` r? `@flip1995` changelog: none
@bors retry (yeeting to rustup PR) |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Funny thing: on my windows machine with this change rustc(or cargo?) forgets to clean 2.2GB of |
Looks like it preserved here, but should this work for |
hmm I see what's happening I think, we use I'll see if upstream will accept another -Z flag for that instead of using |
…nfo, r=b-naber Don't print unsupported split-debuginfo modes with `-Zunstable-options` Currently unsupported `split-debuginfo` options are enabled by `-Zunstable-options`, for projects that have `-Zunstable-options` for other reasons this can be [an unexpected interaction](rust-lang/rust-clippy#10516 (comment)) This PR makes it so that `--print split-debuginfo -Zunstable-options` doesn't print unsupported modes, so that a cargo config of e.g. ```toml [profile.dev] split-debuginfo = "unpacked" ``` Would not cause an unsupported mode to be enabled on `x86_64-pc-windows-msvc`
On Windows this has no effect as it's unsupported. On macOS the default set by cargo is already unpacked so no effect there either
For Linux it shaves a bit off the rebuild time, for me in the case of a simple
touch
+cargo build
it goes from 12s to 10sIt saves a good amount of disk space too, on
aarch64-unknown-linux-gnu
it saves 1.2GB for a plaincargo build
, 3GB when also runningcargo dev
andcargo test --no-run -F internal
r? @flip1995
changelog: none