Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel: Migrate to the native x86_64-unknown-none build target #14

Open
SlyMarbo opened this issue Apr 15, 2022 · 0 comments
Open

bazel: Migrate to the native x86_64-unknown-none build target #14

SlyMarbo opened this issue Apr 15, 2022 · 0 comments
Labels
Bazel Related to the build tooling enhancement New feature or request

Comments

@SlyMarbo
Copy link
Contributor

Now that x86_64-unknown-none is a Tier 2 target (see rust-lang/rust#95705), we should be able to fetch it as a pre-built release. At the very least, this should mean we no longer need to fetch the standard library sources, build libcore and liballoc (and possibly compiler-builtins too). They should be replaced automatically by specifying x86_64-unknown-none in extra_target_triples in rust_register_toolchains.

If we're really lucky, it might even be possible to drop the entire cross-compiling toolchain for Rust. That would simplify things significantly.

@SlyMarbo SlyMarbo added enhancement New feature or request Bazel Related to the build tooling labels Apr 15, 2022
SlyMarbo added a commit that referenced this issue Apr 15, 2022
We will then be able to use the build artefacts within for the
standard library, rather than needing to fetch them from source
and build them locally.

See #14.

Signed-off-by: SlyMarbo <the.sly.marbo@googlemail.com>
SlyMarbo added a commit that referenced this issue Apr 15, 2022
Now that we have the pre-built copies of the Rust standard library
for x86_64-unknown-none, we can use those instead of fetching libcore
and liballoc with the host copy of Rust and fetching compiler_builtins
directly. We also don't need to build them any more.

This takes us part of the way to getting cross-compiling for free
with rules_rust.

See #14.

Signed-off-by: SlyMarbo <the.sly.marbo@googlemail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bazel Related to the build tooling enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant