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

docs: Update to reference host_platform instead of target_platform #1496

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Mar 17, 2025

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.

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.
@wolfv
Copy link
Member

wolfv commented Mar 18, 2025

Thanks for the changes! I am wondering which one is "clearer" to the user ... target_platform or host_platform?

@mgorny
Copy link
Contributor Author

mgorny commented Mar 18, 2025

I think cross-builds are inherently "hard" difficulty, and all terms are hard. In Gentoo, I personally went for explicit CBUILD, CHOST, CTARGET to avoid ambiguity.

@mgorny
Copy link
Contributor Author

mgorny commented Mar 18, 2025

This change was basically prompted by regro/cf-scripts#3832 (comment)

@h-vetinari
Copy link

Thanks for the changes! I am wondering which one is "clearer" to the user ... target_platform or host_platform?

@isuruf has been making the case for following build/host/target (and fixing conda's inconsistent usage of these terms). This matches autotools conventions, but not only. For example, I like meson's write-up on this topic, which comes to the same conclusion.

The "problem" is that the vast majority of cross-compiled cases (already not the most common concern itself) only care about two architectures - where it's built and where it's run. But if you use "target" for the latter, it becomes very confusing in those cases where the full generality is actually necessary (e.g. "canadian cross" compilers).

This is, for example, why our compiler feedstocks need to hack around this by using cross_target_platform, because conda-build uses target_platform for what should be host_platform.

In short: I agree that we should use v1 as an opportunity to clean up these inaccuracies, and +1 for using host_platform.

@isuruf
Copy link

isuruf commented Mar 25, 2025

I think the easiest way to explain to users is

  1. build_platform is the platform for requirements/build
  2. host_platform is the platform for requirements/host.
  3. target_platform is for advanced users (compiler package authors) only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants