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

How to build the documentation using cargo xbuild? #38

Closed gnzlbg closed 5 years ago

gnzlbg commented 5 years ago

I am using xargo doc to build documentation. What's the corresponding cargo-xbuild command for that ?

phil-opp commented 5 years ago

It doesn't exist yet since nobody needed it so far. But it should be relatively simple to add by creating a new binary in src/bin. Do you want to create a pull request?

Nils-TUD commented 5 years ago

As an intermediate solution, you can also use the normal cargo doc for it:

export RUSTFLAGS="--sysroot <sysroot>"
export RUSTDOCFLAGS=$RUSTFLAGS
cargo doc --target <target>
gnzlbg commented 5 years ago

Thanks, I'll stick to xargo for the time being - not sure when I'll have time to create a PR.

phil-opp commented 5 years ago

@gnzlbg Sure! Let's keep this issue open, maybe someone has time to implement it.

gnzlbg commented 5 years ago

@phil-opp wow thank you! I'll see if I can get libc using this instead of xargo. The work of migrating to cargo-xbuild is happening as part of: https://github.com/rust-lang/libc/pull/1376

phil-opp commented 5 years ago

Thank @Aehmlo for that, I only pushed the merge button :D.

I'll see if I can get libc using this instead of xargo. The work of migrating to cargo-xbuild is happening as part of: rust-lang/libc#1376

Oh wow, I didn't expect that. Let me know if you have any problems!

gnzlbg commented 5 years ago

Thank you @Aehmlo !

Let me know if you have any problems!

All green - it just worked.

phil-opp commented 5 years ago

Perfect, great to hear that!