Closed luxalpa closed 5 months ago
cargo-clif internally uses RUSTFLAGS
to specify the codegen backend to use. This overrides build.rustflags
. There is unfortunately no way that I know of to make cargo append rather than override it.
Does that mean that if I use the RUSTFLAGS environment variable workaround above, it will stop building with cranelift and use llvm instead?
If that is the case, does that mean that there is currently no way to use web-sys unstable apis together with cranelift (other than forking web-sys)?
Does that mean that if I use the RUSTFLAGS environment variable workaround above, it will stop building with cranelift and use llvm instead?
cargo-clif does append to RUSTFLAGS
rather than override it, so if you are using RUSTFLAGS
, it will still use cranelift.
ah, now I understand what you're saying. Thanks! Should we close this issue?
Yeah. For cargo-clif there isn't much I can do against it. And for the rustup distributed version choosing the cranelift backend is done in another way which doesn't suffer from this issue.
I'm trying to use web_sys. It works without cargo-clif. It also works if I set my environment variables to
RUSTFLAGS=--cfg=web_sys_unstable_apis
. But it doesn't seem to be able to pick it up from my.cargo/config.toml
that's located in the project. I'm using Windows 11.