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

Reduce the need for the host target triple #1224

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

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Sep 30, 2024

It seems unnecessary to me that the user needs to specify the host target triple when using cc outside a build script, cc ought to be able to figure it out from context. This is harder than it seems though, for example armv6-unknown-freebsd cross compiling to armv7-unknown-freebsd (however unlikely) would be impossible to determine using just target_* cfgs.

For now, though, I've removed the internal get_host helper, and replaced it with get_is_cross_compile, and then used cfg!(...) in the places where we were reading from the host variable before.

Tangentially related to #1219.

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.

1 participant