rustc: Add target_vendor for target triples
This adds a new target property, `target_vendor` which can be used as a matcher for conditional compilation. The vendor is part of the autoconf target triple: <arch><sub>-<vendor>-<os>-<env> The default value for `target_vendor` is "unknown". Matching against the `target_vendor` with `#[cfg]` is currently feature gated as `cfg_target_vendor`.
This commit is contained in:
parent
afae2ff723
commit
af68cdfea1
36 changed files with 95 additions and 3 deletions
|
|
@ -2092,6 +2092,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_vendor = "..."` - Vendor of the target, for example `apple`, `pc`, or
|
||||
simply `"unknown"`.
|
||||
* `test` - Enabled when compiling the test harness (using the `--test` flag).
|
||||
* `unix` - See `target_family`.
|
||||
* `windows` - See `target_family`.
|
||||
|
|
@ -2268,7 +2270,7 @@ The currently implemented features of the reference compiler are:
|
|||
* `advanced_slice_patterns` - See the [match expressions](#match-expressions)
|
||||
section for discussion; the exact semantics of
|
||||
slice patterns are subject to change, so some types
|
||||
are still unstable.
|
||||
are still unstable.
|
||||
|
||||
* `slice_patterns` - OK, actually, slice patterns are just scary and
|
||||
completely unstable.
|
||||
|
|
@ -2289,6 +2291,9 @@ The currently implemented features of the reference compiler are:
|
|||
* `box_syntax` - Allows use of `box` expressions, the exact semantics of which
|
||||
is subject to change.
|
||||
|
||||
* `cfg_target_vendor` - Allows conditional compilation using the `target_vendor`
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue