-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Specifying multiple --target
at once turns on unwanted features
#3182
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
Comments
I didn't even know you could do that. I suspect, if it's compiling each crate once, but with merged features, we can't do anything about this, as we need target specific features for the backend. |
Cargo says it’s compiling twice the number crates so maybe it’s possible…
…On Sun, 6 Nov 2022 at 08:13, Connor Fitzgerald ***@***.***> wrote:
I didn't even know you could do that. I suspect, if it's compiling each
crate once, but with merged features, we can't do anything about this, as
we need target specific features for the backend.
—
Reply to this email directly, view it on GitHub
<#3182 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEJCAI4RJXTIJ4QXGCNLLWG5LANANCNFSM6AAAAAARYI6UIY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@gilescope I think with #3466 merged, this should now work fine. Could you give it another shot? |
Indeed, I just tried it, works. |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I'm making something that targets desktop and wasm it would be great to compile them in one go:
cargo check --target wasm32-unknown-unknown --target x86_64-apple-darwin
Unfortunately while they individually work, I think the metal feature gets turned on for the wasm target and you get lots of errors if you do them together because it then can't find
mtl::
. I'm not sure if this is a fundamental limitation with cargo or whether we can tweak the Cargo.toml? Would be super cool if this worked out of the box.Describe alternatives you've considered
Could just write a shell script to compile both of them but where's the fun in that?
Additional context
Being able to compile for multiple targets at once is fairly new for cargo.
The text was updated successfully, but these errors were encountered: