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

Support multiple targets #3913

Closed
mcandre opened this issue Apr 10, 2017 · 7 comments
Closed

Support multiple targets #3913

mcandre opened this issue Apr 10, 2017 · 7 comments
Labels
A-cross-compiling Area: using --target flag for other platforms C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@mcandre
Copy link

mcandre commented Apr 10, 2017

Allow users to specify multiple targets, such as both x86_64-unknown-linux-gnu and x86_64-unknown-linux-musl, so that cargo build produces both artifacts.

By the way, how will the filename paths differentiate between multiple targets? Gox allows the target metadata to appear in the destination filepath, for example.

@alexcrichton
Copy link
Member

Sounds like a reasonable feature to implement to me! I think the backend of Cargo isn't quite read to do this kind of operation, but with a small amount of refactoring it should be able to, namely parameterizing Kind to have more than one kind of Target.

@carols10cents carols10cents added A-cross-compiling Area: using --target flag for other platforms C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Oct 2, 2017
@steveklabnik
Copy link
Member

I'm hitting this today; I am writing a client and server both in wasm. Client crate needs to be compiled with one target, the server with another.

@michaeleiselsc
Copy link

if we did this, would it be possible to generate the IR only once but build for multiple backends?

@sfackler
Copy link
Member

sfackler commented Mar 20, 2018 via email

@dwijnand
Copy link
Member

What does cargo::ops::cargo_rustc::Kind denote?

@ehuss
Copy link
Contributor

ehuss commented Nov 26, 2018

What does cargo::ops::cargo_rustc::Kind denote?

Kind was moved here. Host is used for proc-macros, plugins, and build scripts which must be compiled for the host architecture. Target is used when the user specifies --target.

@ehuss
Copy link
Contributor

ehuss commented Apr 29, 2020

Closing in favor of tracking issue #8176.

@ehuss ehuss closed this as completed Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross-compiling Area: using --target flag for other platforms C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

8 participants