diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-04-11 13:31:47 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-11 13:31:47 +1000 |
| commit | ea1a31b1501716c60f2f1895e915de8cbca1cff1 (patch) | |
| tree | 0a80886e1c6925aa89a781b9e135cf8936824335 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | a7d7a6d0ebbb76d1a43dbff2db208d341873f550 (diff) | |
| parent | c615d1074300f450c435abbf718969bf4f416f98 (diff) | |
| download | rust-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
