-
Notifications
You must be signed in to change notification settings - Fork 101
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
cargo clif build
does not work on Windows
#1447
Comments
|
Yes, the file does exist and it seems to be working when using |
…use-somewhat, r=bjorn3 Format sources into the error message when loading codegen backends cc rust-lang/rustc_codegen_cranelift#1447 cc `@bjorn3`
Rollup merge of rust-lang#119815 - nagisa:nagisa/polishes-libloading-use-somewhat, r=bjorn3 Format sources into the error message when loading codegen backends cc rust-lang/rustc_codegen_cranelift#1447 cc `@bjorn3`
…hat, r=bjorn3 Format sources into the error message when loading codegen backends cc rust-lang/rustc_codegen_cranelift#1447 cc `@bjorn3`
…hat, r=bjorn3 Format sources into the error message when loading codegen backends cc #1447 cc `@bjorn3`
Could you try again with the latest master version? This now includes rust-lang/rust#119815 which should give a more useful error message. |
Thanks, I've figured out the issue. Cargo uses a different environment based on the toolchain of the project in which it is being run. If it doesn't match the one that's been used to build rustc_codegen_cranelift, it won't find the right versions of the .dlls. Running
in the project folder works. Ironically, due to this, the recent change to the error formating didn't actually yield any difference in output. It was still using the older nightly version and so it was still only displaying "LoadLibraryExW failed" without any useful error message, which had confused me at first. |
That explains it. Does |
It shows the default toolchain for the project (same as |
I can't reproduce that. No matter what I try |
I think this is caused by some Windows specific behavior described in https://internals.rust-lang.org/t/help-test-windows-behavior-between-rustup-and-cargo/20237 Could you try setting the |
Yes, setting that environment variable makes |
Great! As I understand from the linked thread, that will be the default in the future. |
Rustup 1.27 was released just a couple of days before the default was flipped. So this will remain an issue until rustup 1.28 is released. |
Setting up the tool like in the Readme, I am getting this error when running it as
cargo clif build
:The problem doesn't appear when using cargo-clif directly, and it appears on both the msvc and the gnu versions of the latest release.
The text was updated successfully, but these errors were encountered: