about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-02 14:48:01 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-12-02 14:51:03 +0800
commit99c232223f8330debc199f616308bc559b38c361 (patch)
tree44ae233be306578f9d42fd9f070dbb72680b4e6e /compiler/rustc_codegen_llvm/src
parenta522d78598415cdd614ccc6d961160f192f64b5c (diff)
downloadrust-99c232223f8330debc199f616308bc559b38c361.tar.gz
rust-99c232223f8330debc199f616308bc559b38c361.zip
Add `needs-target-has-atomic` directive
Before this commit, the test writer has to specify platforms and
architectures by hand for targets that have differing atomic width
support. `#[cfg(target_has_atomic)]` is not quite the same because (1)
you may have to specify additional matchers manually which has to be
maintained individually, and (2) the `#[cfg]` blocks does not
communicate to compiletest that a test would be ignored for a given
target.

This commit implements a `//@ needs-target-has-atomic` directive which
admits a comma-separated list of required atomic widths that the target
must satisfy in order for the test to run.

```
//@ needs-target-has-atomic: 8, 16, ptr
```

See <https://github.com/rust-lang/rust/issues/87377>.

Co-authored-by: kei519 <masaki.keigo.q00@kyoto-u.jp>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions