Stream: general

Topic: crossbuilding libstd


nagisa (Apr 04 2020 at 21:02, on Zulip):

What’s the go-to way nowadays to build a libstd for some target that rustc knows but does not ship libstd for?

simulacrum (Apr 04 2020 at 21:10, on Zulip):

locally? probably just x.py build --target <target> src/libtest, possibly with --stage 1

simulacrum (Apr 04 2020 at 21:10, on Zulip):

and if you want it in some other project I suspect -Zbuild-std would also just work

nagisa (Apr 04 2020 at 21:12, on Zulip):

I want to test a target that does not have a libstd prebuilt in github actions. So preferably it does not involve pulling down the whole rust repo.

nagisa (Apr 04 2020 at 21:13, on Zulip):

-Zbuild-std might just work.

simulacrum (Apr 04 2020 at 21:40, on Zulip):

I think you need the rust-src component for build-std, but that'd be my recommendation

simulacrum (Apr 04 2020 at 21:41, on Zulip):

if it doesn't work I guess xargo or something might

nagisa (Apr 04 2020 at 22:11, on Zulip):

Turns out getting gcc toolchain for said targets is likely to be the biggest problem. I filled https://github.com/rust-lang/wg-cargo-std-aware/issues/54 for that..

RalfJ (Apr 05 2020 at 06:57, on Zulip):

In the slight chance that it is helpful, Miri can run code for pretty much any target without a toolchain. ;)

Last update: May 29 2020 at 17:50UTC