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

support setting host_platform explicitly #1087

Merged
merged 4 commits into from
Oct 7, 2024
Merged

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Oct 7, 2024

@isuruf I started a PR here to add --host-platform to the arguments.

The current logic is:

The host_platform is defaulted to Platform::current().

If target_platform is unset, then we initialize it to the value of host_platform.

If target_platform is set to something (noarch is forbidden to set btw), then host_platform is set to this value too, if it is not set explicitly (so the current logic continues to work).

Would be great if you let me know if that makes sense to you and what use-cases you had in mind.

@isuruf
Copy link

isuruf commented Oct 7, 2024

Sounds good to me. If both host_platform and target_platform are set, they are not changed right?

The use I have is for the compilers where we would build gcc_{{ target_platform }} which is going to run on host_platform, but produce executables to be run on target_platform. This compiler is built on build_platform.

@wolfv
Copy link
Member Author

wolfv commented Oct 7, 2024

Let me try this use case locally to see what it does :) I'll also add host_platform to the available variables during rendering.

@wolfv wolfv enabled auto-merge (squash) October 7, 2024 15:16
@wolfv wolfv disabled auto-merge October 7, 2024 15:17
@wolfv wolfv enabled auto-merge (squash) October 7, 2024 15:17
@wolfv wolfv merged commit 4b2ae9c into prefix-dev:main Oct 7, 2024
15 checks passed
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.

2 participants