-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Don't print unsupported split-debuginfo modes with -Zunstable-options
#112109
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
791d4c7
to
1ae38dc
Compare
Looks related rust-lang/cargo@64a1f20 |
Sorry for the late reply. I don't really know what this is about (should probably re-assign this), but I'm wondering why would anybody ever use this option, i.e. why would it make sense to enable an unsupported mode? Also would anybody ever rely on unsupported modes through |
I thought the same initially and went to just remove the behaviour, but there are some tests that explicitly use the unsupported modes so I was no longer sure
Should be unrelated to that change, cargo is doing the right thing as it asks rustc what modes are supported with We could change just the |
1ae38dc
to
fda3c9f
Compare
-Z unsupported-split-debuginfo
-Zunstable-options
Can you say which tests those were? |
This was the main one, there was also this arm in |
The changes look reasonable to me, but I'm not sure I fully grasp the implications of this change. So the change only prevents unsupported split-debuginfo options being printed in |
Cargo calls
So with the config [profile.dev]
split-debuginfo = "unpacked" It will determine that When you have
Cargo then thinks rustc supports |
Thanks for the explanation. So it only uses those options for validation? And it doesn't currently error when an option provided in the toml file isn't supported on that machine? If it doesn't error, does it just generate debugging information that is "unusable" on that machine? |
If you have an unsupported (as determined through There's no error/warning from cargo |
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.
Thanks for clarifying this. This seems like the correct fix then. Though I do wonder why this was introduced in the first place then.
Could you maybe open a PR to remove the following line from the split-debuginfo
section on this page: https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo
Attempting to use an unsupported option requires using the nightly channel with the -Z unstable-options flag.
@bors r+ rollup |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#98202 (Implement `TryFrom<&OsStr>` for `&str`) - rust-lang#107619 (Specify behavior of HashSet::insert) - rust-lang#109814 (Stabilize String::leak) - rust-lang#111974 (Update runtime guarantee for `select_nth_unstable`) - rust-lang#112109 (Don't print unsupported split-debuginfo modes with `-Zunstable-options`) - rust-lang#112506 (Properly check associated consts for infer placeholders) r? `@ghost` `@rustbot` modify labels: rollup
Currently unsupported
split-debuginfo
options are enabled by-Zunstable-options
, for projects that have-Zunstable-options
for other reasons this can be an unexpected interactionThis PR makes it so that
--print split-debuginfo -Zunstable-options
doesn't print unsupported modes, so that a cargo config of e.g.Would not cause an unsupported mode to be enabled on
x86_64-pc-windows-msvc