-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Allow rustdoc to get compiled with debuginfo #44812
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
src/bootstrap/tool.rs
Outdated
|
||
// Most tools don't get debuginfo, but rustdoc should. | ||
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()) | ||
.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()) |
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.
Should be build.config
, not self.config
.
[00:02:02] error[E0609]: no field `config` on type `tool::Rustdoc`
[00:02:02] --> /checkout/src/bootstrap/tool.rs:309:43
[00:02:02] |
[00:02:02] 309 | cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string())
[00:02:02] | ^^^^^^ unknown field
[00:02:02] |
[00:02:02] = note: available fields are: `host`
[00:02:02]
[00:02:02] error[E0609]: no field `config` on type `tool::Rustdoc`
[00:02:02] --> /checkout/src/bootstrap/tool.rs:310:49
[00:02:02] |
[00:02:02] 310 | .env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string())
[00:02:02] | ^^^^^^ unknown field
[00:02:02] |
[00:02:02] = note: available fields are: `host`
[00:02:02]
[00:02:02] error: aborting due to 2 previous errors
[00:02:02]
[00:02:02] error: Could not compile `bootstrap`.
767c743
to
6232355
Compare
librustdoc failed to build, citing the metadata flag:
|
6232355
to
7980110
Compare
I checked out this branch, and can confirm that Visual Studio happily set breakpoints and stepped through code in librustdoc with this change. |
src/bootstrap/tool.rs
Outdated
// Most tools don't get debuginfo, but rustdoc should. | ||
cargo.env("RUSTC_DEBUGINFO", builder.config.rust_debuginfo.to_string()) | ||
.env("RUSTC_DEBUGINFO_LINES", builder.config.rust_debuginfo_lines.to_string()) | ||
.env("RUSTC_FORCE_UNSTABLE", "1"); |
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 don't think this env var is necessary because we're not shipping rlibs, just the rustdoc executable
r=me with one minor nit |
7980110
to
33b5ec3
Compare
@bors r+ |
📌 Commit 33b5ec3 has been approved by |
@bors r=alexcrichton p=1 Nominating for beta backport. Tiny patch, and I think without this we may lose nice ICEs from rustdoc. Not overly concerned, though, and I'm not sure how much debug information we ship anyway... |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 33b5ec3 has been approved by |
I don't think we've had rustdoc debuginfo turned on for quite awhile now, right? |
(in that I wouldn't personally be inclined to backport) |
Allow rustdoc to get compiled with debuginfo Fixes #44810 cc @QuietMisdreavus r? @alexcrichton
☀️ Test successful - status-appveyor, status-travis |
Yeah, I don't really care about the backport. I'll denominate -- we can always backport if necessary. |
Fixes #44810
cc @QuietMisdreavus
r? @alexcrichton