Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native supports-expr] docs changes #16971

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/maintainers/control-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,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 @@ -361,7 +361,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 @@ -387,6 +387,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`.