WSL1 does not support `fcntl`-based lock and will always report success,
therefore creating a race condition when multiple rustc processes are
modifying shared data such as `search-index.js`. WSL1 does however
support `flock`.
`flock` is supported by all unix-like platforms. The only caveat is that
Linux 2.6.11 or earlier does not support `flock` on NFS mounts, but as
the minimum supported Linux version is 2.6.18, it is not an issue.
Fixes#72157
Rollup of 5 pull requests
Successful merges:
- #71737 (Miri: run liballoc tests with threads)
- #71928 (Add strikethrough support to rustdoc)
- #72048 (Visit move out of `_0` when visiting `return`)
- #72096 (Make MIR typeck use `LocalDefId` and fix docs)
- #72128 (strings do not have to be valid UTF-8 any more)
Failed merges:
r? @ghost
Use CDN for ci-caches on download
This will reduce costs, as well as lays the groundwork for developers to be able
to locally pull the published docker images without needing AWS credentials.
r? @pietroalbini
Const prop aggregates even if partially or fully modified
r? @wesleywiser
cc @rust-lang/wg-mir-opt I'm moderately scared of this change, but I'm confident in having reviewed all the cases.
Rollup of 4 pull requests
Successful merges:
- #71840 (Rework MIR drop tree lowering)
- #71882 (Update the `cc` crate)
- #71945 (Sort "implementations on foreign types" section in the sidebar)
- #72043 (Add missing backtick in E0569 explanation)
Failed merges:
r? @ghost
Sort "implementations on foreign types" section in the sidebar
Fixes#71926.
We were sorting by the ID instead of sorting by the name. They're not in the same order as the implementations but I think it makes more sense this way considering this is what we do for the methods as well.
r? @kinnison
cc @rust-lang/rustdoc
Rework MIR drop tree lowering
This PR changes how drops are generated in MIR construction. This is the first half of the fix for #47949.
Rather than generating the drops for a given unwind/break/continue/return/generator drop path as soon as they are needed, the required drops are recorded and get generated later.
The motivation for this is
* It simplifies the caching scheme, because it's now possible to walk up the currently scheduled drop tree to recover state.
* The basic block order for MIR more closely resembles execution order.
This PR also:
* Highlights cleanup blocks in the graphviz MIR output.
* Removes some unnecessary drop flag assignments.
Fix disagreeement about CGU reuse and LTO
This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.
The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.
Closes#72006
This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.
The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.
Closes#72006