-
Notifications
You must be signed in to change notification settings - Fork 14k
Build with -Zannotate-moves by default (non-stage-0 only) #148803
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR modifies If appropriate, please update This PR modifies If appropriate, please update |
Build rustc and tools with -Zannotate-moves by default, both to exercise the feature and because could be useful for doing performance measurement on rustc and its tools. This is only added for stage 1 and later. Stage 0 (the bootstrap compiler) doesn't yet support -Zannotate-moves.
2d5c26c to
550107b
Compare
|
Hi, just to clarify, the move annotations are represented in actual debuginfo, e.g. DWARF? Because we don't currently have an easy way of shipping that to end users (and thus we don't ship it), so doing it by default would be pretty useless. |
|
I was thinking it would primarily be useful to Rust developers doing profiling. But it would also apply to sysroot which does have shipped debuginfo, right? |
| // Enable move/copy annotations for profiler visibility if configured | ||
| // Skip stage 0 since the bootstrap compiler doesn't support this flag yet | ||
| if self.config.rust_annotate_moves.unwrap_or(true) && build_compiler_stage >= 1 { | ||
| if let Some(limit) = self.config.rust_annotate_moves_size_limit { | ||
| rustflags.arg(&format!("-Zannotate-moves={}", limit)); | ||
| } else { | ||
| rustflags.arg("-Zannotate-moves"); | ||
| } | ||
| } |
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.
Question: hold on, won't this affect stable compiler dist builds too? Or maybe I'm misunderstanding?
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.
Yeah, that should be fine. It will have no functional effect, aside from some extra debug info.
Build rustc and tools with -Zannotate-moves by default, both to exercise the feature and because could be useful for doing performance measurement on rustc and its tools. This has no effect on generated code, it just adds extra debug info in
the form of some new inlined functions.
This also adds bootstrap.toml config options
to allow this to be controlled locally.
This is only added for stage 1 and later. Stage 0 (the bootstrap compiler) doesn't yet support -Zannotate-moves.
#148197