Skip to content

Make it easier to build libstd, liballoc, libcore, etc for cross compiled environments #32597

Closed
@cardoe

Description

@cardoe

This is really for those that do cross compiles and also for source based distros that cross compile. Right now you must build llvm, rustc, and libstd for each platform you intend to target but the idea here would be you build llvm, rustc and libstd for your HOST and it should only need libstd (and its depends) to be a full cross compile environment. e.g.

<snip>
/usr/lib/rust-1.7.0/rustlib/x86_64-unknown-linux-gnu/lib/libstd-6a154fe0.rlib

<snip>
/usr/lib/rust-1.7.0/rustlib/i686-unknown-linux-gnu/lib/libstd-6a154fe0.rlib

<snip>
/usr/lib/rust-1.7.0/rustlib/mips-unknown-linux-musl/lib/libstd-6a154fe0.rlib

It should be as simple as running: cargo build --target=mips-unknown-linux-musl or cargo build --target=i686-unknown-linux-gnu

A few projects are aiming to provide this or some subset of this but it seems like they run into limitations and have to massage parts of the Rust build system so it would be nice if the new rustbuild supported this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-crossArea: Cross compilationC-feature-requestCategory: A feature request, i.e: not implemented / a PR.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions