cargo-apk: Append --target
to blanket cargo apk --
calls when not provided
#287
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.
Depends on #286, #283
When the user doesn't provide a
--target
we default the triple to the currently connected device overadb
, or otherwise fall back toaarch64
.While this triple is always used to determine what NDK environment to provide, it's never added to the arguments passed after
--
; for example acargo apk -- test --no-run
will try to build tests for the host unless explicitly called with--target
.I can't currently think of any command that one might want to run under
cargo apk --
with an NDK environment, but without support for--target
. If there is, that's a valid argument to not pass this flag (but perhaps clearly document it, maybe even warn about it if we don't find--target
in the call?).