Add support for cross-compiled binaries#25
Merged
esteve merged 1 commit intoros2-rust:mainfrom Jul 24, 2025
Merged
Conversation
luca-della-vedova
approved these changes
Jul 24, 2025
Collaborator
luca-della-vedova
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
Makes sense to me, I haven't tried on cargo-ament-build but I tested on a cargo build in cross compiling and I do see the folder structure you mentioned so the implementation looks correct.
I'll approve first, I'll give it a few days if any other maintainer wants to give it a look then merge it if there is no opposition.
esteve
approved these changes
Jul 24, 2025
Contributor
esteve
left a comment
There was a problem hiding this comment.
@harrisonmg LGTM, thanks!
Contributor
|
@luca-della-vedova thanks for having a look, I'll go and merge this PR |
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.
Cargo puts cross-compiled binaries in an additional subdirectory; for example:
native:
target/debugvs
arm64:
target/aarch64-unknown-linux-gnu/debugFor this reason, cargo-ament-build fails when cross compiling:
This change introduces detection of the build target architecture via the
--targetargument or theCARGO_BUILD_TARGETenvironment variable and modifies the search path for binaries accordingly.