rust-osdev / cargo-xbuild

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.
Apache License 2.0
260 stars 25 forks source link

Print a warning when building for the host target #44

Closed phil-opp closed 5 years ago

phil-opp commented 5 years ago

Building for the host system target is often not intended.

It will also cause 'can't find crate for std' errors in build scripts of dependencies, which try to use the standard library. The reason is that cargo applies the RUSTFLAGS environment variable also to build scripts in native compilation mode, thereby overriding the sysroot.

This issue was reported in https://github.com/phil-opp/blog_os/issues/403#issuecomment-529538864.

phil-opp commented 5 years ago

Published as version 0.5.16