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

Add split-debuginfo print option #104104

Merged
merged 1 commit into from
Nov 9, 2022
Merged

Add split-debuginfo print option #104104

merged 1 commit into from
Nov 9, 2022

Conversation

kamirr
Copy link
Contributor

@kamirr kamirr commented Nov 7, 2022

This option prints all supported values for -Csplit-debuginfo=.., i.e. only stable ones on stable/beta and all of them on nightly/dev.

Motivated by 1.65.0 regression causing builds with the following entry in Cargo.toml to fail on Windows:

[profile.dev]
split-debuginfo = "unpacked"

See rust-lang/cargo#11347 for details.

This will lead to closing #103976.

@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2022

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 7, 2022
This option prints all supported values for -Csplit-debuginfo=.., i.e.
only stable ones on stable/beta and all of them on nightly/dev.
@lcnr
Copy link
Contributor

lcnr commented Nov 8, 2022

cc @davidtwco

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 8, 2022

📌 Commit 4c3cad0 has been approved by lcnr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 8, 2022
Add split-debuginfo print option

This option prints all supported values for `-Csplit-debuginfo=..`, i.e. only stable ones on stable/beta and all of them on nightly/dev.

Motivated by 1.65.0 regression causing builds with the following entry in `Cargo.toml` to fail on Windows:
```toml
[profile.dev]
split-debuginfo = "unpacked"
```

See rust-lang/cargo#11347 for details.

This will lead to closing rust-lang#103976.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 8, 2022
Add split-debuginfo print option

This option prints all supported values for `-Csplit-debuginfo=..`, i.e. only stable ones on stable/beta and all of them on nightly/dev.

Motivated by 1.65.0 regression causing builds with the following entry in `Cargo.toml` to fail on Windows:
```toml
[profile.dev]
split-debuginfo = "unpacked"
```

See rust-lang/cargo#11347 for details.

This will lead to closing rust-lang#103976.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 8, 2022
Add split-debuginfo print option

This option prints all supported values for `-Csplit-debuginfo=..`, i.e. only stable ones on stable/beta and all of them on nightly/dev.

Motivated by 1.65.0 regression causing builds with the following entry in `Cargo.toml` to fail on Windows:
```toml
[profile.dev]
split-debuginfo = "unpacked"
```

See rust-lang/cargo#11347 for details.

This will lead to closing rust-lang#103976.
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 8, 2022
Add split-debuginfo print option

This option prints all supported values for `-Csplit-debuginfo=..`, i.e. only stable ones on stable/beta and all of them on nightly/dev.

Motivated by 1.65.0 regression causing builds with the following entry in `Cargo.toml` to fail on Windows:
```toml
[profile.dev]
split-debuginfo = "unpacked"
```

See rust-lang/cargo#11347 for details.

This will lead to closing rust-lang#103976.
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 8, 2022
…llaumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#103928 (Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed')
 - rust-lang#104027 (Place config.toml in current working directory if config not found)
 - rust-lang#104093 (disable btree size tests on Miri)
 - rust-lang#104097 (run alloc benchmarks in Miri and fix UB)
 - rust-lang#104104 (Add split-debuginfo print option)
 - rust-lang#104109 (rustdoc: Add mutable to the description)
 - rust-lang#104113 (Fix `const_fn_trait_ref_impl`, add test for it)
 - rust-lang#104114 (Fix invalid background-image file name)
 - rust-lang#104132 (fix: lint against lint functions)
 - rust-lang#104139 (Clarify licensing situation of MPSC and SPSC queue)
 - rust-lang#104147 (Remove an address comparison from the parser)
 - rust-lang#104165 (Add llvm-main to triagebot.toml)

Failed merges:

 - rust-lang#104115 (Migrate crate-search element to CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 92f1c6f into rust-lang:master Nov 9, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 9, 2022
bors added a commit to rust-lang/cargo that referenced this pull request Jan 26, 2023
Fix split-debuginfo support detection

### What does this PR try to resolve?
cargo assumed that if `-Csplit-debuginfo=packed` worked, all values would be correct. This however is not the case -- as of Rust 1.65.0, rustc supports `packed`, but not `unpacked` or `off` on Windows. Because of this, having `split-debuginfo="unpacked`" on Windows has caused builds to fail, as cargo assumed that the option is fine (`split-debuginfo=packed` worked), but rustc then failed when being passed `-Csplit-debuginfo=unpacked`.

### How should we test and review this PR?
Consider an empty project with the following change to `Cargo.toml`:
```toml
[profile.dev]
split-debuginfo="unpacked"
```
`cargo +1.64.0 build` will work, but `cargo +1.65.0 build` will fail with the following error message:

```
PS C:\REDACTED> cargo build
   Compiling tmp v0.1.0 (C:\REDACTED)
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: could not compile `tmp` due to previous error
```

With this patch and 1.65.0 rustc, cargo will ignore all `split-debuginfo` settings, but with rust-lang/rust#104104 rustc (approved, awaiting merge), it will properly detect supported values for `split-debuginfo` and only ignore those that are unsupported.
bors added a commit to rust-lang/cargo that referenced this pull request Jan 26, 2023
Fix split-debuginfo support detection

### What does this PR try to resolve?
cargo assumed that if `-Csplit-debuginfo=packed` worked, all values would be correct. This however is not the case -- as of Rust 1.65.0, rustc supports `packed`, but not `unpacked` or `off` on Windows. Because of this, having `split-debuginfo="unpacked`" on Windows has caused builds to fail, as cargo assumed that the option is fine (`split-debuginfo=packed` worked), but rustc then failed when being passed `-Csplit-debuginfo=unpacked`.

### How should we test and review this PR?
Consider an empty project with the following change to `Cargo.toml`:
```toml
[profile.dev]
split-debuginfo="unpacked"
```
`cargo +1.64.0 build` will work, but `cargo +1.65.0 build` will fail with the following error message:

```
PS C:\REDACTED> cargo build
   Compiling tmp v0.1.0 (C:\REDACTED)
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: could not compile `tmp` due to previous error
```

With this patch and 1.65.0 rustc, cargo will ignore all `split-debuginfo` settings, but with rust-lang/rust#104104 rustc (approved, awaiting merge), it will properly detect supported values for `split-debuginfo` and only ignore those that are unsupported.
weihanglo pushed a commit to weihanglo/cargo that referenced this pull request Jan 29, 2023
…=weihanglo

Fix split-debuginfo support detection

### What does this PR try to resolve?
cargo assumed that if `-Csplit-debuginfo=packed` worked, all values would be correct. This however is not the case -- as of Rust 1.65.0, rustc supports `packed`, but not `unpacked` or `off` on Windows. Because of this, having `split-debuginfo="unpacked`" on Windows has caused builds to fail, as cargo assumed that the option is fine (`split-debuginfo=packed` worked), but rustc then failed when being passed `-Csplit-debuginfo=unpacked`.

### How should we test and review this PR?
Consider an empty project with the following change to `Cargo.toml`:
```toml
[profile.dev]
split-debuginfo="unpacked"
```
`cargo +1.64.0 build` will work, but `cargo +1.65.0 build` will fail with the following error message:

```
PS C:\REDACTED> cargo build
   Compiling tmp v0.1.0 (C:\REDACTED)
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: could not compile `tmp` due to previous error
```

With this patch and 1.65.0 rustc, cargo will ignore all `split-debuginfo` settings, but with rust-lang/rust#104104 rustc (approved, awaiting merge), it will properly detect supported values for `split-debuginfo` and only ignore those that are unsupported.
aleasims pushed a commit to NilFoundation/zkllvm-cargo that referenced this pull request Nov 22, 2023
Fix split-debuginfo support detection

cargo assumed that if `-Csplit-debuginfo=packed` worked, all values would be correct. This however is not the case -- as of Rust 1.65.0, rustc supports `packed`, but not `unpacked` or `off` on Windows. Because of this, having `split-debuginfo="unpacked`" on Windows has caused builds to fail, as cargo assumed that the option is fine (`split-debuginfo=packed` worked), but rustc then failed when being passed `-Csplit-debuginfo=unpacked`.

Consider an empty project with the following change to `Cargo.toml`:
```toml
[profile.dev]
split-debuginfo="unpacked"
```
`cargo +1.64.0 build` will work, but `cargo +1.65.0 build` will fail with the following error message:

```
PS C:\REDACTED> cargo build
   Compiling tmp v0.1.0 (C:\REDACTED)
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: could not compile `tmp` due to previous error
```

With this patch and 1.65.0 rustc, cargo will ignore all `split-debuginfo` settings, but with rust-lang/rust#104104 rustc (approved, awaiting merge), it will properly detect supported values for `split-debuginfo` and only ignore those that are unsupported.
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants