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

Allow users to pick cargo for custom target builds #431

Merged
merged 3 commits into from
Jun 12, 2020

Conversation

anupdhml
Copy link
Contributor

@anupdhml anupdhml commented Jun 4, 2020

This is an attempt to fix #325.

We want to use the target x86_64-alpine-linux-musl (available from alpine's rustc) to build musl-based binaries and when using cross with something not in the standard rustc/rustup targets, cross errors out as detailed in the issue above.

For a non-standard target, cross defaults to using xargo right now (behavior introduced in #217), but in our case, since we want cargo to run ultimately, I had to also ensure that setting xargo = false actually works from the cross config file. If there's a better way of handling this without breaking the current default behavior, please let me know.

Also updated the docs on xargo usage accordingly (including the parts that were lagging even without this PR).


A working example of cross use based on the changes here are available at:
https://github.com/wayfair-tremor/tremor-runtime/blob/f72e133f971adca67f6e6b6e265a4f5d5e96380d/Cross.toml#L30-L37


Thanks for providing a tool like cross btw! It's been really useful to us as we are looking to streamline our release process 😃

anupdhml added 3 commits June 4, 2020 16:48
This prevents cross from erroring out and exiting when we have a custom
target which we know will be available in the docker image (but is not
one of the standard rustup targets). An example of such a target is
"x86_64-alpine-linux-musl" which is a custom target that the alpine
distro uses and is available when using rustc from its repositories.
@reitermarkus
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 12, 2020

Build succeeded:

@bors bors bot merged commit 095870a into cross-rs:master Jun 12, 2020
@reitermarkus
Copy link
Member

Thanks!

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.

sh: 1: xargo: Permission denied
2 participants