Skip to content

Commit afdcef3

Browse files
committed
docs: Update to reference host_platform instead of target_platform
Update the documentation throughout to replace the references to `target_platform` with `host_platform` where appropriate. That said, unless I've missed some fine point, this means pretty much everywhere. Signed-off-by: Michał Górny <mgorny@quansight.com>
1 parent 00e00be commit afdcef3

10 files changed

Lines changed: 27 additions & 27 deletions

File tree

docs/build_script.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ macOS.
390390
| Variable | Description |
391391
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
392392
| `MACOSX_DEPLOYMENT_TARGET` | Same as the Anaconda Python macOS deployment target. Currently `10.9` for intel 32- and 64bit macOS, and 11.0 for arm64. |
393-
| `OSX_ARCH` | `i386` or `x86_64` or `arm64`, depending on the target platform |
393+
| `OSX_ARCH` | `i386` or `x86_64` or `arm64`, depending on the host platform |
394394

395395
#### Linux
396396

docs/compilers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To use a compiler in your project, it's best to use the `${{ compiler('lang')
44
}}` template function. The compiler function works by taking a language,
55
determining the configured compiler for that language, and adding some
6-
information about the target platform to the selected compiler. To configure a
6+
information about the host platform to the selected compiler. To configure a
77
compiler for a specific language, the `variants.yaml` file can be used.
88

99
For example, in a recipe that uses a C-compiler, you can use the following code:
@@ -35,7 +35,7 @@ variant config.
3535

3636
Cross-compilation is supported by Rattler-Build and the compiler template
3737
function is part of what makes it possible. When you want to cross-compile from
38-
`linux-64` to `linux-aarch64` (i.e. intel to ARM), you can pass `--target-platform
38+
`linux-64` to `linux-aarch64` (i.e. intel to ARM), you can pass `--host-platform
3939
linux-aarch64` to the `rattler-build` command. This will cause the compiler
4040
template function to select a compiler that is configured for `linux-aarch64`.
4141
The above example would resolve to `gcc_linux-aarch64 9.3.0`. Provided that the
@@ -57,7 +57,7 @@ build:
5757
- cmake
5858
- ${{ compiler('c') }}
5959
# packages that we want to link against in the architecture we are
60-
# cross-compiling to the target_platform
60+
# cross-compiling to the host_platform
6161
host:
6262
- libcurl
6363
- openssl

docs/conda_forge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Ensure your recipe includes all required metadata:
8383
The PR template includes a checklist. Key items:
8484

8585
- [ ] License file is included in the package
86-
- [ ] Recipe builds on all target platforms
86+
- [ ] Recipe builds on all host platforms
8787
- [ ] Tests are included and pass
8888
- [ ] Recipe follows conda-forge guidelines
8989
- [ ] You've added yourself as a maintainer

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ For the `curl` library recipe, two additional script files (`build.sh` and `buil
154154
# Get an updated config.sub and config.guess
155155
cp $BUILD_PREFIX/share/libtool/build-aux/config.* .
156156

157-
if [[ $target_platform =~ linux.* ]]; then
157+
if [[ $host_platform =~ linux.* ]]; then
158158
USESSL="--with-openssl=${PREFIX}"
159159
else
160160
USESSL="--with-secure-transport"

docs/reference/jinja.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ functions and filters that can be used in the recipe.
88
### The compiler function
99

1010
The compiler function can be used to put together a compiler that works for the
11-
current platform and the compilation "`target_platform`". The syntax looks like:
11+
current platform and the compilation "`host_platform`". The syntax looks like:
1212
`${{ compiler('c') }}` where `'c'` signifies the programming language that is
1313
used.
1414

15-
This function evaluates to `<compiler>_<target_platform> <compiler_version>`.
15+
This function evaluates to `<compiler>_<host_platform> <compiler_version>`.
1616
For example, when compiling _on_ `linux` and _to_ `linux-64`, this function
1717
evaluates to `gcc_linux-64`.
1818

@@ -38,9 +38,9 @@ c_compiler_version:
3838
```
3939
4040
The variables shown above would select the `clang` compiler in version `9.0`.
41-
Note that the final output will still contain the `target_platform`, so that the
41+
Note that the final output will still contain the `host_platform`, so that the
4242
full compiler will read `clang_linux-64 9.0` when compiling with
43-
`--target-platform linux-64`.
43+
`--host-platform linux-64`.
4444

4545
Rattler-Build defines some default compilers for the following languages
4646
(inherited from `conda-build`):
@@ -54,11 +54,11 @@ Rattler-Build defines some default compilers for the following languages
5454

5555
The `stdlib` function closely mirrors the compiler function. It can be used to
5656
put together a standard library that works for the current platform and the
57-
compilation "`target_platform`".
57+
compilation "`host_platform`".
5858

5959
Usage: `${{ stdlib('c') }}`
6060

61-
Results in `<stdlib>_<target_platform> <stdlib_version>`. And uses the variant
61+
Results in `<stdlib>_<host_platform> <stdlib_version>`. And uses the variant
6262
variables `<lang>_stdlib` and `<lang>_stdlib_version` to influence the output.
6363

6464
#### Usage in a recipe:

docs/reference/recipe_file.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -642,11 +642,11 @@ requirements:
642642

643643
### Host
644644

645-
Represents packages that need to be specific to the target platform when the
646-
target platform is not necessarily the same as the native build platform. For
645+
Represents packages that need to be specific to the host platform when the
646+
host platform is not necessarily the same as the native build platform. For
647647
example, in order for a recipe to be "cross-capable", shared libraries
648648
requirements must be listed in the `host` section, rather than the `build` section,
649-
so that the shared libraries that get linked are ones for the target platform,
649+
so that the shared libraries that get linked are ones for the host platform,
650650
rather than the native build platform. You should also include the base
651651
interpreter for packages that need one. In other words, a Python package would
652652
list `python` here and an R package would list `mro-base` or `r-base`.
@@ -665,8 +665,8 @@ requirements:
665665
!!! note
666666
When both "`build`" and "`host`" sections are defined, the `build` section can
667667
be thought of as "build tools" - things that run on the native platform, but
668-
output results for the target platform (e.g. a cross-compiler that runs on
669-
`linux-64`, but targets `linux-armv7`).
668+
output results for the host platform (e.g. a cross-compiler that runs on
669+
`linux-64`, but builds for `linux-armv7`).
670670

671671

672672
The `PREFIX` environment variable points to the host prefix. With respect to
@@ -1374,7 +1374,7 @@ available during the Rattler-Build process: `pin_compatible`, `pin_subpackage`,
13741374
`compiler` and `stdlib`.
13751375

13761376
The `compiler` function takes `c`, `cxx`, `fortran` and other values as argument
1377-
and automatically selects the right (cross-)compiler for the target platform.
1377+
and automatically selects the right (cross-)compiler for the host platform.
13781378
Similarly, `stdlib` function selects the right standard library dependencies.
13791379

13801380
```

docs/selectors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ host:
5454
Other examples often found in the wild:
5555
5656
```yaml
57-
if: build_platform != target_platform ... # true if cross-platform build
57+
if: build_platform != host_platform ... # true if cross-platform build
5858
if: osx and arm64 ... # true for apple silicon (osx-arm64)
5959
if: linux and (aarch64 or ppc64le)) ... # true for linux ppc64le or linux-aarch64
6060
```
@@ -65,14 +65,14 @@ The following variables are available during rendering of the recipe:
6565
6666
| Variable | Description |
6767
|----------------------|------------------------------------------------------------------------|
68-
| `target_platform` | the configured `target_platform` for the build |
6968
| `build_platform` | the configured `build_platform` for the build |
7069
| `host_platform` | the configured `host_platform` for the build |
70+
| `target_platform` | the configured `target_platform` for the build |
7171
| `linux` | "true" if `host_platform` is Linux |
7272
| `osx` | "true" if `host_platform` is OSX / macOS |
7373
| `win` | "true" if `host_platform` is Windows |
7474
| `unix` | "true" if `host_platform` is a Unix (macOS or Linux) |
75-
| `x86`, `x86_64` | x86 32/64-bit Architecture (based on `host_platform`) |
75+
| `x86`, `x86_64` | x86 32/64-bit Architecture |
7676
| `aarch64` | 64-bit Arm (if `host_platform` is `linux-aarch64`) |
7777
| `arm64` | 64-bit Arm (if `host_platform` is `osx-arm64` or `win-arm64`) |
7878
| `armV6l`, `armV7l` | 32-bit Arm |

docs/snippets/recipes/linkerd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package:
33
version: 25.5.2
44

55
source:
6-
- if: target_platform == "linux-64"
6+
- if: host_platform == "linux-64"
77
then:
88
url: https://github.com/linkerd/linkerd2/releases/download/edge-25.5.2/linkerd2-cli-edge-25.5.2-linux-amd64
99
sha256: 55e7721ab0eb48217f239628b55517b7d663a962df18cdab180e5d42e45f83cb
1010
file_name: linkerd
11-
- if: target_platform == "osx-arm64"
11+
- if: host_platform == "osx-arm64"
1212
then:
1313
url: https://github.com/linkerd/linkerd2/releases/download/edge-25.5.2/linkerd2-cli-edge-25.5.2-darwin-arm64
1414
sha256: 405ddf3af0089bfece93d811c9bfb9f63e3a000e3f423163fc56690ef4d427cf

docs/tutorials/repackaging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ This example shows how to repackage the `linkerd` binary. The `linkerd` binary i
1515

1616
!!! note
1717

18-
To repackage the `linkerd` package on `osx-arm64` for `linux-64`, you can pass the `--target-platform` argument to `rattler-build`:
18+
To repackage the `linkerd` package on `osx-arm64` for `linux-64`, you can pass the `--host-platform` argument to `rattler-build`:
1919

2020
```bash
21-
rattler-build build --target-platform linux-64 linkerd
21+
rattler-build build --host-platform linux-64 linkerd
2222
```
2323

2424
## Adding system requirements

docs/tutorials/rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This utility manages Cargo dependencies from the command line.
99

1010
!!! note
1111
The `${{ compiler(...) }}` functions are very useful in the context of cross-compilation.
12-
When the function is evaluated it will insert the correct compiler (as selected with the variant config) as well the `target_platform`.
13-
The "rendered" compiler will look like `rust_linux-64` when you are targeting the `linux-64` platform.
12+
When the function is evaluated it will insert the correct compiler (as selected with the variant config) as well the `host_platform`.
13+
The "rendered" compiler will look like `rust_linux-64` when you are building for the `linux-64` platform.
1414

1515
You can read more about this in the [cross-compilation](../compilers.md) section.
1616

0 commit comments

Comments
 (0)