-
Notifications
You must be signed in to change notification settings - Fork 102
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
Building for target different than current OS one #1217
Comments
Cranelift doesn't yet have a wasm backend, so it can't compile for wasm32-unknown-unknown. See bytecodealliance/wasmtime#2566. You will have to use the default llvm backend of rustc for now. For all supported targets (x86_64 and aarch64 at the moment) this can be done by setting https://github.com/bjorn3/rustc_codegen_cranelift/blob/8f02c4e2ee4a5e86bc14a3fe4d1bee9c3f2fc253/config.txt#L11 and rebuilding cg_clif. |
@bjorn3, I'm not building cranelift for |
If you want to build a project for a target using cranelift, cranelift needs to have a backend for this target. So building a project or wasm using cranelift requires that cranelift has a wasm backend which it doesn't yet. |
Oh, that's unfortunate. Guess we got to deal with it the way it is now... |
I'm trying to build a project for
wasm32-unknown-unknown
but failing at it because there is no target added. I do not understand how I can add the target.Complete output (with errors)
This works when I use with cargo installed via rustup but not with cranelift one. Any help would be appriciated
The text was updated successfully, but these errors were encountered: