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

config.toml: debuginfo option documentation is confusing #52179

Closed
RalfJung opened this issue Jul 9, 2018 · 0 comments · Fixed by #60568
Closed

config.toml: debuginfo option documentation is confusing #52179

RalfJung opened this issue Jul 9, 2018 · 0 comments · Fixed by #60568
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Jul 9, 2018

The current documentation for the debuginfo options looks like this:

# Whether or not debuginfo is emitted
#debuginfo = false

# Whether or not line number debug information is emitted
#debuginfo-lines = false

# Whether or not to only build debuginfo for the standard library if enabled.
# If enabled, this will not compile the compiler with debuginfo, just the
# standard library.
#debuginfo-only-std = false

# Enable debuginfo for the extended tools: cargo, rls, rustfmt
# Adding debuginfo makes them several times larger.
#debuginfo-tools = false

Now I am left wondering:

  • If I want to have debuginfo for std and nothing else, I thought I had to just change debuginfo-only-std but that did not have any effect. So it seems I first have to enable debuginfo but then restrict it using only-std? That's surprising, and not documented.
  • If I set debuginfo, debuginfo-only-std and debuginfo-tools, which things get debuginfo?
  • If I set debuginfo = false and debuginfo-tools = true, do the tools get debuginfo?
@jonas-schievink jonas-schievink added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 27, 2019
bors added a commit that referenced this issue May 24, 2019
rustbuild: Simplify debuginfo configuration

This is supposed to fix #52179

This PR introduces one option `debuginfo-level` replacing `debuginfo` and `debuginfo-lines` and corresponding to the `rustc` flag `-C debuginfo=N`.

`debuginfo-level` serves as a default for all Rust code built during bootstrap, but it can be overridden for specific subsets of code using finer-grained options `debuginfo-level-{rustc,std,tools,tests}` replacing `debuginfo-only-std`, `debuginfo-tools` and `debuginfo-tests`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
2 participants