about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-04-11 13:31:47 +1000
committerGitHub <noreply@github.com>2025-04-11 13:31:47 +1000
commitea1a31b1501716c60f2f1895e915de8cbca1cff1 (patch)
tree0a80886e1c6925aa89a781b9e135cf8936824335 /compiler/rustc_codegen_llvm/src/errors.rs
parenta7d7a6d0ebbb76d1a43dbff2db208d341873f550 (diff)
parentc615d1074300f450c435abbf718969bf4f416f98 (diff)
downloadrust-ea1a31b1501716c60f2f1895e915de8cbca1cff1.tar.gz
rust-ea1a31b1501716c60f2f1895e915de8cbca1cff1.zip
Rollup merge of #139469 - jieyouxu:compiletest-supports-crate-type, r=onur-ozkan
Introduce a `//@ needs-crate-type` compiletest directive

The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose `//@ ignore-$target` directive (often without comment).

Fixes #132309.

### Example

```rs
//@ needs-crate-type: dylib (ignored on e.g. wasm32-unknown-unknown)
//@ compile-flags: --crate-type=dylib

fn foo() {}
```

### Review advice

- Best reviewed commit-by-commit.
- The impl is not very clean, I briefly attempted to clean up the directive handling but found that more invasive changes are needed, so I'd like to not block on the cleanup for now.

try-job: test-various
try-job: armhf-gnu
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions