Repository navigation
fix(profile): preserve inherited strip - #17678
Conversation
|
r? @Muscraft rustbot has assigned @Muscraft. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This is not preserved at all (yet).
fda6198 to
f66be6c
Compare
|
This PR was rebased onto a different master 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. |
|
Am I reading this right that another way to frame this is that we have a default, deferred build override to strip? Granted, stripping doesn't help with performance but it can help with disk space. Granted, if debug info for build scripts and proc-macros is a major size concern for us then we are doing pretty good. |
Yes, though I don't think it was intentional. This bug was discovered during my experiment.
I do have a follow-up master...weihanglo:cargo:strip-host-deps that it save around 200MiB for cargo itself (around 7-13% of total target dir disk size, varying across debuginfo levels). My agents found these latent bugs emerging because of my |
Update cargo submodule 6 commits in 3c747ea3ead23951c1b43a5edfcbdb449135ddeb..111443f3dc4d82a65e2306a93028f122406401c1 2026-11-03 21:25:31 +0000 to 2026-11-05 22:22:33 +0000 - chore: Update libssh2-sys to 0.3.4 (rust-lang/cargo#17692) - fix(profile): preserve inherited strip (rust-lang/cargo#17678) - feat(cargo-platform): implement Serialize/Deserialize for Cfg & CfgExpr (rust-lang/cargo#17598) - fix: proc-macro typo in &String -> CrateType impl (rust-lang/cargo#17687) - book faq.md: remove misplaced `)` in offline section (rust-lang/cargo#17682) - fix(registry): handle HTTP 410/451 for missing crates (rust-lang/cargo#17665)
Update cargo submodule 6 commits in 3c747ea3ead23951c1b43a5edfcbdb449135ddeb..111443f3dc4d82a65e2306a93028f122406401c1 2026-11-03 21:25:31 +0000 to 2026-11-05 22:22:33 +0000 - chore: Update libssh2-sys to 0.3.4 (rust-lang/cargo#17692) - fix(profile): preserve inherited strip (rust-lang/cargo#17678) - feat(cargo-platform): implement Serialize/Deserialize for Cfg & CfgExpr (rust-lang/cargo#17598) - fix: proc-macro typo in &String -> CrateType impl (rust-lang/cargo#17687) - book faq.md: remove misplaced `)` in offline section (rust-lang/cargo#17682) - fix(registry): handle HTTP 410/451 for missing crates (rust-lang/cargo#17665)
…17691) ### What does this PR try to resolve? Fixes rust-lang#17688 For `cargo build` of cargo itself, which contains 37 build scripts and 12 proc-macros, it save around 7%-12% target directory size: | `debug` | target dir before -> after | build scripts | proc-macro `.so` | |---------|---------------------------|--------------------|-----------------------| | `true` | 2774.3 -> 2563.7 MiB (-210.6, −7.6%) | 186 -> 35 MiB | 103.9 -> 42.5 MiB | | `line-tables-only` | 1639.7 -> 1430.1 MiB (−209.6, −12.8%) | 184 -> 35 MiB | 103.9 -> 42.5 MiB | <sup>(table generated by LLM)</sup> ### Notes to reviewers The other twos PR are better landing first otherwise those "buggy" behavior may be more exposed * rust-lang#17689 * rust-lang#17678 The other idea brought up in rust-lang#17688 that we drop the weakening logic so this becomes the default behavior, and we no longer need to fix this by moving code block (which is pretty obsecure). However, that might need a longer time to land so I feel like this is probably easier to land. --- 🤖 LLM involvement: Test/snapshot generation
What does this PR try to resolve?
Profile override wasn't respected for the
stripoption.The changed was introduced in 0608fcd99d (1.52),
and the smarter stripping also failed to notice the bug (58da1cec19a, 1.77).
After this PR, overridding the
stripprofile option is respected.Notes to reviewers
I believe this was an oversight as nobody really override the
stripoption,though I could be wrong.
🤖 LLM involvement: This was pointed out during Codex reviewing my other experiments. I was really mad that they submitted a PR without my consent: #17677. Tests are anyway generated. Change is one-line change. I deleted and typed it manually so counted as hand-written? (of course I tweaked the test a bit and wrote my own description)