-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 6 pull requests #113673
Rollup of 6 pull requests #113673
Conversation
This setting was added to match rustfmt, but it's been taking effect on all file editing, which I notice most on git `COMMIT_EDITMSG`. I want to keep my default 72-width commit messages, please. :)
because sometimes users can't opt out
avoid building proof trees in select otherwise we ICE because select isn't currently set up to print proof trees. r? `````@BoxyUwU`````
Only use max_line_length = 100 for *.rs This setting was added to match rustfmt, but it's been taking effect on all file editing, which I notice most on git `COMMIT_EDITMSG`. I want to keep my default 72-width commit messages, please. :)
refactor proof tree formatting mostly: - handle indentation via a separate formatter - change nested to use a closure tested it after rebasing on top of rust-lang#113536 and everything looks good. r? `````@BoxyUwU`````
…notriddle Add jump to doc I'm using the source code pages of the compiler quite a lot, but one thing missing is the possibility to jump back from the source code to the item documentation. Since I also got a few others complaining about it, I think it's fine to add it since this option is nightly only. This PR adds a link to jump back to item's documentation on the item definition (so on `Bar` in `struct Bar {... }`, as described in the unofficial [RFC](https://github.com/GuillaumeGomez/rfcs/blob/rustdoc-jump-to-definition/text/000-rustdoc-jump-to-definition.md)). r? ````@notriddle````
Add Adt to SMIR r? ````@oli-obk````
make MCP510 behavior opt-in to avoid conflicts between the CLI and target flavors Fixes rust-lang#113597, which contains more details on how this happens through the code, and showcases an unexpected `Gnu(Cc::Yes, Lld::Yes)` flavor. rust-lang#112910 added support to use `lld` when the flavor requests it, but didn't explicitly do so only when using `-Clink-self-contained=+linker` or one of the unstable `-Clinker-flavor`s. The problem: some targets have a `lld` linker and flavor, e.g. `thumbv6m-none-eabi` from that issue. Users can override the linker but there are no linker flavors precise enough to describe the linker opting out of lld: when using `-Clinker=arm-none-eabi-gcc`, we infer this is a `Cc::Yes` linker flavor, but the `lld` component is unknown and therefore defaulted to the target's linker flavor, `Lld::Yes`. <details> <summary>Walkthrough of how this happens</summary> The linker flavor used is a mix between what can be inferred from the CLI (`-C linker`) and the target's default linker flavor: - there is no linker flavor on the CLI (and that also offers another workaround on nightly: `-C linker-flavor=gnu-cc -Zunstable-options`), so it will have to be inferred [from here](https://github.com/lqd/rust/blob/5dac6b320be868f898a3c753934eabc79ff2e406/compiler/rustc_codegen_ssa/src/back/link.rs#L1334-L1336) to [here](https://github.com/lqd/rust/blob/5dac6b320be868f898a3c753934eabc79ff2e406/compiler/rustc_codegen_ssa/src/back/link.rs#L1321-L1327). - in [`infer_linker_hints`](https://github.com/lqd/rust/blob/5dac6b320be868f898a3c753934eabc79ff2e406/compiler/rustc_target/src/spec/mod.rs#L320-L352) `-C linker=arm-none-eabi-gcc` infers a `Some(Cc::Yes)` cc hint, and no hint about lld. - the target's `linker_flavor` is combined in `with_cli_hints` with these hints. We have our `Cc::Yes`, but there is no hint about lld, [so the target's flavor `lld` component is used](https://github.com/lqd/rust/blob/5dac6b320be868f898a3c753934eabc79ff2e406/compiler/rustc_target/src/spec/mod.rs#L356-L358). It's [`Gnu(Cc::No, Lld::Yes)`](https://github.com/rust-lang/rust/blob/993deaa0bf8bab9dd3eadfd1fbeb093328e95afe/compiler/rustc_target/src/spec/thumb_base.rs#L35). - so we now have our `Gnu(Cc::Yes, Lld::Yes)` flavor </details> This results in a `Gnu(Cc::Yes, Lld::Yes)` flavor on a non-lld linker, causing an additional unexpected `-fuse-ld=lld` argument to be passed. I don't know if this target defaulting to `rust-lld` is expected, but until MCP510's new linker flavor are stable, when people will be able to describe their linker/flavor accurately, this PR keeps the stable behavior of not doing anything when the linker/flavor on the CLI unexpectedly conflict with the target's. I've tested this on a `no_std` `-C linker=arm-none-eabi-gcc -C link-arg=-nostartfiles --target thumbv6m-none-eabi` example, trying to simulate one of `cortex-m`'s test mentioned in issue rust-lang#113597 (I don't know how to build a local complete `thumbv6m-none-eabi` toolchain to run the exact test), and checked that `-fuse-lld` was indeed gone and the error disappeared. r? `````@petrochenkov`````
@bors r+ rollup=never p=6 |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: a161ab00db In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (7bd81ee): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 658.555s -> 658.412s (-0.02%) |
This is a doc regression on However, benchmarks weren't supposed to be affected by that PR if I understand correctly; maybe some of the additional work happens on regular codepaths, and not only when source links are on. This is probably fine but let's cc PR author @GuillaumeGomez and reviewer @notriddle just in case. |
The change in #113623 is behind a disabled-by-default option, so it seems very unlikely to come from this one. |
It's the only PR that looks like it could impact a doc benchmark in this rollup. |
Then no clue. |
Let's launch a perf run for the PR just in case it's noise. @rust-timer build ef7ad853d355f408a8b1ee8a007bd8c4be4f9838 Is the perf hit acceptable to T-rustdoc ? Or would the team like to investigate whether some codepaths were changed that were not protected by some verification that the option in question is enabled ? If the regression is acceptable/expected/not worth investigating, simply mark this PR as |
This comment has been minimized.
This comment has been minimized.
We have a suspicion about an unnecessary string allocation. Sending a fix. |
Finished benchmarking commit (ef7ad853d355f408a8b1ee8a007bd8c4be4f9838): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDInstruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 658.555s -> 658s (-0.08%) |
Successful merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup