rust/tests
bors 8af70c7a18 Auto merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleywiser
llvm: change data layout bug to an error and make it trigger more

Fixes #33446.

Don't skip the inconsistent data layout check for custom LLVMs or non-built-in targets.

With #118708, all targets will have a simple test that would trigger this error if LLVM's data layouts do change - so data layouts would be corrected during the LLVM upgrade. Therefore, with builtin targets, this error won't happen with our LLVM because each target will have been confirmed to work. With non-builtin targets, this error is probably useful to have because you can change the data layout in your target and if it is wrong then that could lead to bugs.

When using a custom LLVM, the same justification makes sense for non-builtin targets as with our LLVM, the user can update their target to match their LLVM and that's probably a good thing to do. However, with a custom LLVM, the user cannot change the builtin target data layouts if they don't match - though given that the compiler's data layout is used for layout computation and a bunch of other things - you could get some bugs because of the mismatch and probably want to know about that. I'm not sure if this is something that people do and is okay, but I doubt it?

`CFG_LLVM_ROOT` was also always set during local development with `download-ci-llvm` so this bug would never trigger locally.

In #33446, two points are raised:

- In the issue itself, changing this from a `bug!` to a proper error is what is suggested, by using `isCompatibleDataLayout` from LLVM, but that function still just does the same thing that we do and check for equality, so I've avoided the additional code necessary to do that FFI call.
- `@Mark-Simulacrum` suggests a different check is necessary to maintain backwards compatibility with old LLVM versions. I don't know how often this comes up, but we can do that with some simple string manipulation + LLVM version checks as happens already for LLVM 17 just above this diff.
2024-01-27 12:19:41 +00:00
..
assembly Split assembly tests for ELF and MachO 2024-01-25 16:17:35 +01:00
auxiliary
codegen Auto merge of #119911 - NCGThompson:is-statically-known, r=oli-obk 2024-01-25 05:16:53 +00:00
codegen-units
coverage Rollup merge of #120185 - Zalathar:auto-derived, r=wesleywiser 2024-01-24 15:43:12 +01:00
coverage-run-rustdoc coverage: Don't instrument #[automatically_derived] functions 2024-01-22 12:18:57 +11:00
debuginfo Improved collapse_debuginfo attribute, added command-line flag (no|external|yes) 2024-01-17 23:18:14 +07:00
incremental Track verbose and verbose_internals 2024-01-20 08:00:09 -05:00
mir-opt Rollup merge of #119562 - LegionMammal978:rename-pin-pointer, r=Amanieu,dtolnay 2024-01-26 23:15:49 +01:00
pretty Add #[coverage(off)] to closures introduced by #[test]/#[bench] 2024-01-21 23:17:00 +11:00
run-make Auto merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleywiser 2024-01-27 12:19:41 +00:00
run-make-fulldeps Auto merge of #118899 - veera-sivarajan:fix-makefile, r=Mark-Simulacrum 2024-01-05 07:42:03 +00:00
run-pass-valgrind
rustdoc Remove uses of no-system-llvm 2024-01-23 10:31:07 +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 Rollup merge of #118194 - notriddle:notriddle/tuple-unit, r=GuillaumeGomez 2024-01-06 16:07:46 +01:00
rustdoc-js-std Rollup merge of #118194 - notriddle:notriddle/tuple-unit, r=GuillaumeGomez 2024-01-06 16:07:46 +01:00
rustdoc-json
rustdoc-ui Rollup merge of #119730 - vuittont60:master, r=GuillaumeGomez 2024-01-18 20:56:19 +01:00
ui Auto merge of #120062 - davidtwco:llvm-data-layout-check, r=wesleywiser 2024-01-27 12:19:41 +00:00
ui-fulldeps Ensure internal function is safe 2024-01-19 10:00:32 +00:00
COMPILER_TESTS.md