-
Notifications
You must be signed in to change notification settings - Fork 23
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
autocfg does not work in the presence of -Z build-std #34
Comments
Does cargo communicate this in any way? Maybe an environment variable? |
Use build-std instead of xargo. The changes to num-integer and indexmap are to work around cuviper/autocfg#34.
Use build-std instead of xargo. The changes to num-integer and indexmap are to work around cuviper/autocfg#34.
Otherwise, it fails to build with -Z build-std, see cuviper/autocfg#34
This breaks the bigint crate for certain targets like |
There's no plan how to fix it yet... Assuming you mean |
Some dependent crates rely on features which get deactivated because of this, even though bigint builds successfully... I'll try to build the stdlib by hand in the meantime. Hopefully |
Why does autocfg care if the crate is loaded from the sysroot or passed with --extern? Shouldn't |
Oh, is the problem that cargo only passes --extern std=... to the final crate, not to build scripts? I wonder if it should set some environment variable with a list of the std crates built from source ... in general I think it would be nice for cargo to expose a way for build scripts to invoke rustc the same way cargo would in the current build. |
Ah, that already exists and it's called CARGO_ENCODED_RUSTFLAGS 😄 I think we should open an upstream issue for cargo to include the --extern std flags in CARGO_ENCODED_RUSTFLAGS. |
build.rs:
cargo build
works fine for any target where libstd is already distributed.cargo build --target x86_64-uwp-windows-msvc -Z build-std
panics even though the sysroot is being built correctly.The text was updated successfully, but these errors were encountered: