rust/tests
Matthias Krüger d776c5a835
Rollup merge of #144523 - ojeda:rustdoc-target-modifiers, r=GuillaumeGomez
rustdoc: save target modifiers

`rustdoc` was filling a `target_modifiers` variable, but it was not using the result.

In turn, that means that trying to use a dependency that set a target modifier fails.

For instance, running:

```sh
RUSTC_BOOTSTRAP=1 rustc --edition=2024 --target=aarch64-unknown-none-softfloat --sysroot=/dev/null --emit=metadata -Zfixed-x18 --crate-type rlib --crate-name core $(rustc --print sysroot)/lib/rustlib/src/rust/library/core/src/lib.rs

echo '#![allow(internal_features)]
' | RUSTC_BOOTSTRAP=1 rustdoc --edition=2021 --target=aarch64-unknown-none-softfloat --sysroot=/dev/null -Zfixed-x18 --extern core=libcore.rmeta -
```

will fail with:

```text
error: mixing `-Zfixed-x18` will cause an ABI mismatch in crate `rust_out`
  |
  = help: the `-Zfixed-x18` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely
  = note: unset `-Zfixed-x18` in this crate is incompatible with `-Zfixed-x18=` in dependency `core`
  = help: set `-Zfixed-x18=` in this crate or unset `-Zfixed-x18` in `core`
  = help: if you are sure this will not cause problems, you may use `-Cunsafe-allow-abi-mismatch=fixed-x18` to silence this error
```

Thus save the targets modifiers in `Options` to then pass it to the session options, so that eventually the diff can be performed as expected in `report_incompatible_target_modifiers()`.

Cc: ``@azhogin``
Fixes: https://github.com/rust-lang/rust/issues/144521
2025-07-28 01:16:39 +02:00
..
assembly-llvm Rollup merge of #144430 - Gelbpunkt:aarch64-outline-atomics-target, r=Noratrieb 2025-07-26 22:42:37 -04:00
auxiliary So many test updates x_x 2025-07-20 10:15:14 -07:00
codegen-llvm Auto merge of #144347 - scottmcm:ssa-enums-v0, r=WaffleLapkin 2025-07-27 06:37:55 +00:00
codegen-units Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk 2025-06-27 12:57:05 +00:00
coverage Revert "coverage: Enlarge empty spans during MIR instrumentation, not codegen" 2025-07-26 11:14:40 +10:00
coverage-run-rustdoc
crashes Check static is sized when building MIR. 2025-07-25 02:31:59 +00:00
debuginfo Rephrase comment to include some tracking issues 2025-07-21 21:57:08 +02:00
incremental Bless incremental tests. 2025-07-13 13:50:01 +00:00
mir-opt Rollup merge of #144480 - Zalathar:revert-empty-span, r=Zalathar 2025-07-26 22:42:39 -04:00
pretty Update uitest stderrs 2025-07-23 13:33:23 +02:00
run-make Rollup merge of #144523 - ojeda:rustdoc-target-modifiers, r=GuillaumeGomez 2025-07-28 01:16:39 +02:00
rustdoc Regression test 2025-07-17 08:03:17 +02:00
rustdoc-gui Update rustdoc GUI tests 2025-07-01 15:49:45 +02:00
rustdoc-js Add test for aliases partial match 2025-07-16 14:27:22 +02:00
rustdoc-js-std Add test for aliases partial match 2025-07-16 14:27:22 +02:00
rustdoc-json rustdoc-json: Structured attributes 2025-07-15 16:52:41 +00:00
rustdoc-ui Specify of_trait in Target::Impl. 2025-07-17 22:21:21 +00:00
ui Rollup merge of #143607 - JonathanBrouwer:proc_macro_attrs, r=jdonszelmann,traviscross 2025-07-28 01:16:38 +02:00
ui-fulldeps use RustcPublic instead of StableMir 2025-07-18 18:49:32 +00:00
COMPILER_TESTS.md