mirror of https://github.com/microsoft/vcpkg.git
[native supports-expr] docs changes (#16971)
This commit is contained in:
parent
49b67d9cb8
commit
a3db16a447
|
|
@ -138,6 +138,7 @@ The grammar for the supports expression uses standard operators:
|
|||
- `(expr)` - grouping/precedence
|
||||
|
||||
The predefined expressions are computed from standard triplet settings:
|
||||
- `native` - `TARGET_TRIPLET` == `HOST_TRIPLET`
|
||||
- `x64` - `VCPKG_TARGET_ARCHITECTURE` == `"x64"`
|
||||
- `x86` - `VCPKG_TARGET_ARCHITECTURE` == `"x86"`
|
||||
- `arm` - `VCPKG_TARGET_ARCHITECTURE` == `"arm"` or `VCPKG_TARGET_ARCHITECTURE` == `"arm64"`
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ platform-expression =
|
|||
| platform-expression-and
|
||||
| platform-expression-or ;
|
||||
|
||||
platform-expression-identifier =
|
||||
platform-expression-identifier =
|
||||
| identifier-character, { identifier-character }, optional-whitespace ;
|
||||
|
||||
platform-expression-simple =
|
||||
|
|
@ -396,6 +396,8 @@ Ands and ors are a list of `&` or `|` separated identifiers, negated expressions
|
|||
One may not mix `&` and `|` without parentheses for grouping.
|
||||
|
||||
These predefined identifier expressions are computed from standard triplet settings:
|
||||
- `native` - `TARGET_TRIPLET` == `HOST_TRIPLET`;
|
||||
useful for ports which depend on their own built binaries in their build.
|
||||
- `x64` - `VCPKG_TARGET_ARCHITECTURE` == `"x64"`
|
||||
- `x86` - `VCPKG_TARGET_ARCHITECTURE` == `"x86"`
|
||||
- `arm` - `VCPKG_TARGET_ARCHITECTURE` == `"arm"` or `VCPKG_TARGET_ARCHITECTURE` == `"arm64"`
|
||||
|
|
|
|||
|
|
@ -57,3 +57,9 @@ else()
|
|||
# This is a cross build
|
||||
endif()
|
||||
```
|
||||
|
||||
## Host-only ports
|
||||
|
||||
Some ports are host-only: script ports and tool ports are common examples.
|
||||
In this case, you can use the `"native"` supports expression to describe this.
|
||||
This supports expression is true when `TARGET_TRIPLET == HOST_TRIPLET`.
|
||||
|
|
|
|||
Loading…
Reference in New Issue