feat!: Add partial support for armv7-unknown-linux-gnueabihf - #253
Merged
Conversation
That the build tools force the user to compile for `thumbv7neon` when `armv7` would also work has bothered me for a while, but it has not been a problem before #251 where building for `armv7` would probably have been a quick workaround. This commit makes it possible to build for `armv7` using `cargo-acap-build`. Details ======= `crates/acap-build/src/lib.rs`: - Allowed targets are still modelled as a closed set because to make sure all inputs map to a package architecture correctly and that the CLI documents and fails early where such a mapping is not implemented. - The default target remains `thumbv7neon` because it is not incorrect and whatever the reasons for choosing that as our preferred target were I don't think they have meaningfully changed. `crates/cargo-acap-build/src/main.rs`: - Continue accepting the architecture nicknames as arguments because they are easier to remember and type than the full cargo target triple. - Use the `--target` option for the target triple to make the interface familiar to rust programmers; `--arch` does to my knowledge not collide with any upstream options. `crates/cargo-acap-sdk/src/main.rs`: - Rename `--target` to `--arch` to align with `cargo` and `cargo-acap-build`. - `From<ArchAbi> for Target` is not implemented because it would implie a one-to-one mapping which does not exist. `crates/cargo-acap-build/src/main.rs`, `crates/cargo-acap-sdk/src/main.rs`: - Use the shortened "arch" instead of "architecture" because the latter is a lot to type.
guoxe
reviewed
Aug 7, 2026
guoxe
left a comment
Contributor
There was a problem hiding this comment.
Overall I think this is a good idea, can't hurt to allow armv7 as well.
IIRC the original reason for picking thumb as a default is because the instructions are smaller which should result in smaller binaries.
apljungquist
marked this pull request as ready for review
August 8, 2026 06:16
guoxe
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That the build tools force the user to compile for
thumbv7neonwhenarmv7would also work has bothered me for a while, but it has not been a problem before #251 where building forarmv7would probably have been a quick workaround. This commit makes it possible to build forarmv7usingcargo-acap-build.Details
crates/acap-build/src/lib.rs:thumbv7neonbecause it is not incorrect and whatever the reasons for choosing that as our preferred target were I don't think they have meaningfully changed.crates/cargo-acap-build/src/main.rs:--targetoption for the target triple to make the interface familiar to rust programmers;--archdoes to my knowledge not collide with any upstream options.crates/cargo-acap-sdk/src/main.rs:--targetto--archto align withcargoandcargo-acap-build.From<ArchAbi> for Targetis not implemented because it would implie a one-to-one mapping which does not exist.crates/cargo-acap-build/src/main.rs,crates/cargo-acap-sdk/src/main.rs: