Skip to content

Commit

Permalink
[native supports-expr] docs changes (microsoft#16971)
Browse files Browse the repository at this point in the history
  • Loading branch information
strega-nil authored May 21, 2021
1 parent 49b67d9 commit a3db16a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/maintainers/control-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 3 additions & 1 deletion docs/maintainers/manifest-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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"`
Expand Down
6 changes: 6 additions & 0 deletions docs/users/host-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit a3db16a

Please sign in to comment.