Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd support for custom targets in the style of xargo/cargo-xbuild #1538
Comments
This comment has been minimized.
This comment has been minimized.
ketsuban
commented
Dec 8, 2018
|
As I understand it the developers intend to fold cargo-xbuild's functionality into Cargo itself (rust-lang/cargo#4959) but progress stalled for the duration of Rust 2018's impl period because the embedded WG ended up only needing a small number of new targets rather than a general solution for compiling the standard library for arbitrary targets. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
james-darkfox commentedNov 9, 2018
•
edited
Hello.
I've been using
xargofor a while and recently checked outcargo-xbuild. Curious as to how these work, I realised all that you need to do is build the libcore-etc for the target and put these in the sysroot directory. Rustup manages its own sysroot for common targets.It would be really nice if we could instead do
rustup target add x86_64-sel4-robigalia.jsonto ask rustup to track the target file and rebuild the libcore-etc when either rustc updates or when the user attempts to build something using the target with a newer rustc or when the target file changes.As a bonus feature it might be faster (or bandwidth-cheaper or just more convenient such as when offline) for some people to build any simple targets using only
rust-srcand a collection oftarget.jsonfiles.I'm currently just using unmodified and unwrapped cargo with only these two environment variables set after having used xargo/xbuild at least once after calling
rustup update.