Add #[cfg(target_has_atomic)] to get atomic support for the current target

This commit is contained in:
Amanieu d'Antras 2016-04-15 20:16:19 +01:00
parent 50909f2d50
commit 04835ea5ec
45 changed files with 90 additions and 10 deletions

View file

@ -2091,6 +2091,8 @@ The following configurations must be defined by the implementation:
* `target_pointer_width = "..."` - Target pointer width in bits. This is set
to `"32"` for targets with 32-bit pointers, and likewise set to `"64"` for
64-bit pointers.
* `target_has_atomic = "..."` - Set of integer sizes on which the target can perform
atomic operations. Values are `"8"`, `"16"`, `"32"`, `"64"` and `"ptr"`.
* `target_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
simply `"unknown"`.
* `test` - Enabled when compiling the test harness (using the `--test` flag).
@ -2295,6 +2297,9 @@ The currently implemented features of the reference compiler are:
* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
matcher which is subject to change.
* `cfg_target_has_atomic` - Allows conditional compilation using the `target_has_atomic`
matcher which is subject to change.
* `concat_idents` - Allows use of the `concat_idents` macro, which is in many
ways insufficient for concatenating identifiers, and may be
removed entirely for something more wholesome.