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

feat: add --arch flag to hc check subcommand to allow detection override #433

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

j-lanson
Copy link
Collaborator

Resolves #415 .

We had previously encountered problems with cross-compilation to niche-but-valid architectures, where the compile-time target detection would fail, causing CURRENT_ARCH to be () instead of a valid arch enum variant. We changed this field to be type Option<SupportedArch> and also support a user-provided --arch flag to override the detected arch at runtime if the user has good reason to do so.

…detection override

We had previously encountered problems with cross-compilation to
niche-but-valid architectures, where the compile-time target detection
would fail, causing `CURRENT_ARCH` to be `()` instead of a valid arch
enum variant. We changed this field to be type `Option<SupportedArch>`
and also support a user-provided `--arch` flag to override the detected
arch at runtime if the user has good reason to do so.
@j-lanson j-lanson added type: enhancement New feature or request product: hc Relates to the core "hc" binary labels Sep 20, 2024
@j-lanson j-lanson added this to the 3.7.0 milestone Sep 20, 2024
@j-lanson j-lanson self-assigned this Sep 20, 2024
@alilleybrinker
Copy link
Collaborator

alilleybrinker commented Sep 20, 2024

Thanks @j-lanson! I think this is part of what we need, and I'm happy to merge as-is. The part that's missing is expanding the SupportedArch enum to reflect more architectures we may not auto-detect, but which we can allow users to specify. In my specific case that would be aarch64-unknown-linux-gnu but there are certainly others we could reflect in the enum.

@alilleybrinker alilleybrinker merged commit 5817dd4 into main Sep 20, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: hc Relates to the core "hc" binary type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fails to compile on not-explicitly-listed architecture
2 participants