Skip to content

Commit

Permalink
Auto merge of #123364 - klensy:bs-mixed-types, r=albertlarsan68
Browse files Browse the repository at this point in the history
bootstrap: actually allow set debuginfo-level to "line-tables-only"

I've tried to set in config.toml `rust.debuginfo-level = "line-tables-only"`, but ended with:
``` failed to parse TOML configuration 'config.toml':
data did not match any variant of untagged enum StringOrInt for key `rust.debuginfo-level`
```
Also this PR allows to set `line-directives-only` for debuginfo in config.toml too.
1. Fixes this. Alternative is remove that Deserialize and use default one:
https://github.com/rust-lang/rust/blob/0e682e9875458ebf811206a48b688e07d762d9bb/src/bootstrap/src/core/config/config.rs#L725-L728

2. Should `line-directives-only` be added too?

3. I've tried to add test to rust/src/bootstrap/src/core/config/tests.rs:
```rust
#[test]
fn rust_debuginfo() {
    assert!(matches!(
        parse("rust.debuginfo-level-rustc = 1").rust_debuginfo_level_rustc,
        DebuginfoLevel::Limited
    ));
    assert!(matches!(
        parse("rust.debuginfo-level-rustc = \"line-tables-only\"").rust_debuginfo_level_rustc,
        DebuginfoLevel::LineTablesOnly
    ));
}
```

But test passes before that PR too; looks like config parse tests checks something wrong? I mean, that tests check something which isn't actual bootstrap behavior.
  • Loading branch information
bors committed Apr 19, 2024
2 parents f816f7e + 93a578e commit df77fef
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit df77fef

Please sign in to comment.