rust-osdev / cargo-xbuild

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

Compiler builtins should now be downloaded from crates.io #22

Closed HadrienG2 closed 5 years ago

HadrienG2 commented 5 years ago

Now that https://github.com/rust-lang/rust/pull/56092 has landed, and that the nightlies are fixed, cargo-xbuild fails because it cannot find the compiler builtins source in rust-src. This is normal: it is not a submodule anymore, and must now be downloaded from crates.io. To quote @alexcrichton in that PR...

As a proof of concept, this commit removes the dlmalloc, libcompiler_builtins, and libc submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules.

This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree std-building tools like xargo and cargo-xbuild. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the [patch] section used to build the standard library. Hopefully we can work with these tools to solve this problem!

The PR description contains more details about what exactly has changed, and how cargo-xbuild should be modified to account for this change.

HadrienG2 commented 5 years ago

Relevant patch for xargo: https://github.com/japaric/xargo/pull/229 . Or you can use this one if you prefer: https://github.com/japaric/xargo/pull/228 .

phil-opp commented 5 years ago

Thanks for reporting. I'm looking into this now