rustc-dev-guide: document `needs-crate-type`

This commit is contained in:
Jieyou Xu 2025-04-07 13:18:03 +08:00
parent ac450254e6
commit 5fb6b8e48f
No known key found for this signature in database
GPG Key ID: 045B995028EA6AFC
1 changed files with 6 additions and 1 deletions

View File

@ -191,8 +191,13 @@ settings:
specified atomic widths, e.g. the test with `//@ needs-target-has-atomic: 8,
16, ptr` will only run if it supports the comma-separated list of atomic
widths.
- `needs-dynamic-linking` - ignores if target does not support dynamic linking
- `needs-dynamic-linking` ignores if target does not support dynamic linking
(which is orthogonal to it being unable to create `dylib` and `cdylib` crate types)
- `needs-crate-type` — ignores if target platform does not support one or more
of the comma-delimited list of specified crate types. For example,
`//@ needs-crate-type: cdylib, proc-macro` will cause the test to be ignored
on `wasm32-unknown-unknown` target because the target does not support the
`proc-macro` crate type.
The following directives will check LLVM support: