-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
rustbuild: allow building tools with debuginfo #49959
Conversation
Debugging information for the extended tools is currently disabled for concerns about the size. This patch adds `--enable-debuginfo-tools` to let one opt into having that debuginfo. This is useful for debugging the tools in distro packages. We always strip debuginfo into separate packages anyway, so the extra size is not a concern in regular use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the two nits this looks good to me, r=me.
src/bootstrap/config.rs
Outdated
@@ -582,6 +586,7 @@ impl Config { | |||
}; | |||
config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default); | |||
config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default); | |||
config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default
is true on stable/beta/nightly; could you either move it up to where we have llvm_assertions
or change the default to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll make it plain false.
config.toml.example
Outdated
@@ -262,6 +262,10 @@ | |||
# standard library. | |||
#debuginfo-only-std = false | |||
|
|||
# Enable debuginfo for the extended tools: cargo, rls, rustfmt | |||
# Adding debuginfo increases their sizes by a factor of 3-4. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize that these numbers are just copied from old comments, but could you verify that building Cargo (for example) with debuginfo is a 3-4x increase? I'd prefer not to perpetuate potentially wrong information into more places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, actually, I get 15MB without debuginfo, 95MB with! And that's "without" that actually still includes some debuginfo from linked std etc. -- the fully stripped size is 9.2MB.
Let's avoid numbers though -- how about I'll just say that it's several times larger.
@bors r=Mark-Simulacrum |
📌 Commit 93734e9 has been approved by |
@bors rollup |
…ulacrum rustbuild: allow building tools with debuginfo Debugging information for the extended tools is currently disabled for concerns about the size. This patch adds `--enable-debuginfo-tools` to let one opt into having that debuginfo. This is useful for debugging the tools in distro packages. We always strip debuginfo into separate packages anyway, so the extra size is not a concern in regular use.
Rollup of 8 pull requests Successful merges: - #49555 (Inline most of the code paths for conversions with boxed slices) - #49606 (Prevent broken pipes causing ICEs) - #49646 (Use box syntax instead of Box::new in Mutex::remutex on Windows) - #49647 (Remove `underscore_lifetimes` and `match_default_bindings` from active feature list) - #49931 (Fix incorrect span in `&mut` suggestion) - #49959 (rustbuild: allow building tools with debuginfo) - #49965 (Remove warning about f64->f32 cast being potential UB) - #49994 (Remove unnecessary indentation in rustdoc book codeblock.) Failed merges:
Debugging information for the extended tools is currently disabled for
concerns about the size. This patch adds
--enable-debuginfo-tools
tolet one opt into having that debuginfo.
This is useful for debugging the tools in distro packages. We always
strip debuginfo into separate packages anyway, so the extra size is not
a concern in regular use.