Skip to content
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

Merged
merged 3 commits into from
Apr 16, 2018

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Apr 14, 2018

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.

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.
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a 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.

@@ -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);
Copy link
Member

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?

Copy link
Member Author

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.

@@ -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.
Copy link
Member

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.

Copy link
Member Author

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.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 14, 2018

@bors r=Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Apr 14, 2018

📌 Commit 93734e9 has been approved by Mark-Simulacrum

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 14, 2018
@Mark-Simulacrum
Copy link
Member

@bors rollup

kennytm added a commit to kennytm/rust that referenced this pull request Apr 16, 2018
…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.
bors added a commit that referenced this pull request Apr 16, 2018
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:
@bors bors merged commit 93734e9 into rust-lang:master Apr 16, 2018
@cuviper cuviper deleted the debuginfo-tools branch April 17, 2018 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants