-
Notifications
You must be signed in to change notification settings - Fork 95
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
Using in Windows #1509
Comments
Cranelift doesn't support enough optimizations to make it useful in release mode.
It isn't distibuted with rustup on Windows yet. You can download the latest version from https://github.com/rust-lang/rustc_codegen_cranelift/releases/tag/dev instead, extract it somewhere and then run the contained cargo-clif.exe in the place of cargo.exe. |
I think it would be beneficial if there was a bigger notice in README.md that the usage instructions above the section mentioning precompiled binaries (for Windows) don't all easily transfer. I at least can't get rustc to accept the |
I added cargo-clif to C:\Users\User\Documents\code\rustduck\src-tauri>rustup default
nightly-x86_64-pc-windows-msvc (default)
C:\Users\User\Documents\code\rustduck\src-tauri>cargo-clif build
warning: `C:\Users\User\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: `C:\Users\User\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Cpanic=abort -Zpanic-abort-tests -Zcodegen-backend=C:\apps\bin\cargo-clif\bin\rustc_codegen_cranelift.dll --sysroot C:\apps\bin\cargo-clif --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit code: 1)
--- stderr
error: the option `Z` is only accepted on the nightly compiler
help: consider switching to a nightly toolchain: `rustup default nightly`
note: selecting a toolchain with `+toolchain` arguments require a rustup proxy; see <https://rust-lang.github.io/rustup/concepts/index.html>
note: for more information about Rust's stability policy, see <https://doc.rust-lang.org/book/appendix-07-nightly-rust.html#unstable-features>
error: 1 nightly option were parsed |
That was an issue with rustc. I reinstalled it and it got fixed. I compared build time with
|
Sorry for the late reply @mikkelens. With the precompiled binaries from the releases page you probably want to use cargo-clif.exe instead of using the cargo configs. |
It's unclear how can I use this codegen in Windows.
I would like to use it both locally and on Github actions for faster build with Rust on Windows.
Does it improve speed for release builds?
rustup default nightly
What should I do after installing nightly rust and set it as deafult?
The text was updated successfully, but these errors were encountered: