This commit adds the necessary definitions for target specs and such as well as
the necessary support in libstd to compile basic `aarch64-pc-windows-msvc`
binaries. The target is not currently built on CI, but it can be built locally
with:
./configure --target=aarch64-pc-windows-msvc --set rust.lld
./x.py build src/libstd --target aarch64-pc-windows-msvc
Currently this fails to build `libtest` due to a linker bug (seemingly in LLD?)
which hasn't been investigate yet. Otherwise though with libstd you can build a
hello world program (linked with LLD). I've not tried to execute it yet, but it
at least links!
Full support for this target is still a long road ahead, but this is hopefully a
good stepping stone to get started.
Points of note about this target are:
* Currently defaults to `panic=abort` as support is still landing in LLVM for
SEH on AArch64.
* Currently defaults to LLD as a linker as I was able to get farther with it
than I was with `link.exe`
by strengthening the tests (by adding no-op references to the
closures doing the borrows after the conflicting borrows, thus
forcing the lifetimes to resemble lexical scopes even under NLL).
by strengthening the tests there.
In almost all cases the strengthening amount to just encoding a use
that models the original lexical lifetime. A more invasive revision
was made in one case where it seems the actual issue is MIR-borrowck's
greater "knowledge" of unreachable code in the control flow...
Rollup of 8 pull requests
Successful merges:
- #52453 (improve diagnostics for tests with custom return values)
- #53271 (use ? to simplify `TransitiveRelation.maybe_map`)
- #53279 (Extend documentation of `rustc_on_unimplemented`)
- #53342 (fix error for unsized packed struct field)
- #53344 (Add doc examples for std::alloc::{alloc,alloc_zeroed}.)
- #53368 (Ignore test that fails on stage1)
- #53388 (Fix links' color)
- #53396 (Fix since of Iterator::flatten to be a proper semver)
Failed merges:
r? @ghost
fix error for unsized packed struct field
It was really confusing to be told "only the last field of a struct may have a dynamically sized type" when only the last field *was* unsized.
improve diagnostics for tests with custom return values
This is an attempt at getting the ball rolling to improve the diagnostics for test functions that return custom `impl Termination` values (see #52436).
An alternative could be to use `eprintln!`, but including this in the panic message felt nicely consistent with how failing test assertions would be reported.
Let me know what you think!