rust/tests
bors d6c46a23ce Auto merge of #120060 - saethlin:mir-opt-bless-targets, r=wesleywiser
Use the same mir-opt bless targets on all platforms

This undoes some of the implementation in https://github.com/rust-lang/rust/pull/119035, but not the effect. Sorry for the churn, I've learned a lot about how all this works over the past few weeks.

The objective here is to make `x test mir-opt --bless` use the same set of targets on all platforms. It didn't do that from the start because bootstrap assumes that a target linker is available, so the availability of cross-linkers is how we ended up with `MIR_OPT_BLESS_TARGET_MAPPING` and poor support for blessing mir-opt tests from Aarch64 MacOS. This PR corrects that.

So I've adjusted the bless targets for mir-opt tests, as well as tweaked some of the logic in bootstrap about linker configuration so that we don't try to access the cache of cc/linker configuration when doing the mir-opt builds.

While working on that I realized that if I swapped from the `cargo rustc -p std` strategy to `cargo check` on the sysroot, I could use the existing code for check builds to bypass some linker logic. Sweet.

But just doing that doesn't work, because then mir-opt tests complain that they can't find an rlib for any of the standard library crates. That happens because nearly all the mir-opt tests are attempting to build `CrateType::Executable`. We already have all the MIR required for mir-opt tests from the rmeta files, but since rustc think we're trying to build an executable it demands we have access to all the upstream monomorphizations that only exist in rlibs, not the meta files in a MIR-only sysroot.

So to fix that, I've swapped all the mir-opt tests be passed `--crate-type=rlib`. That works, but leaves us with a few broken mir-opt tests which I've blessed or fixed up; we also lose MIR for some functions so I added `-Clink-dead-code` to paper over that. The inlining changes are because changing the crate-type perturbs the hashes that are compared here to sometimes let us do inlining even in a possibly-recursive call: 4cb17b4e78/compiler/rustc_mir_transform/src/inline.rs (L332-L341)
2024-02-07 14:01:21 +00:00
..
assembly Revert "Add the wasm32-wasi-preview2 target" 2024-01-28 02:02:50 +01:00
auxiliary
codegen Rollup merge of #120502 - clubby789:remove-ffi-returns-twice, r=compiler-errors 2024-02-06 22:45:42 +01:00
codegen-units Update tests 2024-02-07 10:42:01 +08:00
coverage coverage: Make unexpansion of closure bodies more precise 2024-02-05 10:09:46 +11:00
coverage-run-rustdoc coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
debuginfo Update tests. 2024-01-27 16:38:57 +01:00
incremental fix rebase 2024-02-01 22:38:16 +00:00
mir-opt Fixup async_closure_shims mir-opt test 2024-02-06 23:40:58 -05:00
pretty Auto merge of #120227 - nnethercote:further-improve-space_between, r=petrochenkov 2024-01-31 02:01:43 +00:00
run-make Update data layouts in custom target tests for LLVM 18 2024-01-31 15:15:59 +01:00
run-make-fulldeps
run-pass-valgrind
rustdoc Rollup merge of #120501 - GuillaumeGomez:glob-reexport-attr-merge-bugfix, r=notriddle 2024-01-31 12:10:53 +01:00
rustdoc-gui Rollup merge of #119746 - notriddle:notriddle/resize-close-modals, r=fmease 2024-01-22 07:56:42 +01:00
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui Rollup merge of #116284 - RalfJung:no-nan-match, r=cjgillot 2024-02-05 11:07:26 +01:00
ui Update tests 2024-02-07 10:42:01 +08:00
ui-fulldeps Update tests 2024-02-07 10:42:01 +08:00
COMPILER_TESTS.md