-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Automatically enable -Zorbit if -Zincremental is specified. #35159
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
Automatically enable -Zorbit if -Zincremental is specified. #35159
Conversation
DebuggingOptions { | ||
orbit: true, | ||
.. debugging_opts | ||
} |
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.
This is a bit too much, could mutation be used instead?
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.
Easily optimised out.
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.
Though, I agree it would look better with mutation here.
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 was talking about code readability, not performance 😆.
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.
This is a bit too much, could mutation be used instead?
You think? I actually thought that it was more readable that way. The alternative would be to make debugging_opts
mutable, but it's within a huge function.
Or would you prefer this:
let debugging_opts = if debugging_opts.incremental.is_some() &&
!debugging_opts.orbit {
early_warn(error_format, "Automatically enabling `-Z orbit` because \
`-Z incremental` was specified");
let mut debugging_opts = debugging_opts;
debugging_opts.orbit = true;
debugging_opts
}
I really don't care that much one way or the other, just tell me which version you want :)
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 would've expected making debugging_opts
mutable to be fine.
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.
OK, I'll change it.
r=me once updated |
c62a3ed
to
f900b18
Compare
@bors r=nikomatsakis |
📌 Commit f900b18 has been approved by |
⌛ Testing commit f900b18 with merge 359fdda... |
💔 Test failed - auto-win-msvc-64-opt |
// except according to those terms. | ||
|
||
// ignore-pretty | ||
// compile-flags:-Zincremental=tmp/cfail-tests/enable-orbit-for-incr-comp |
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.
You need -Zorbit=off
now to test this.
f900b18
to
44dbc49
Compare
@bors r=nikomatsakis Set |
📌 Commit 44dbc49 has been approved by |
⌛ Testing commit 44dbc49 with merge f495483... |
…komatsakis Automatically enable -Zorbit if -Zincremental is specified. Fixes #34973 r? @nikomatsakis
Fixes #34973
r? @nikomatsakis