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

Try out lld, so we can cross-build dependencies for arbitrary targets #317

Closed
oli-obk opened this issue Aug 28, 2017 · 3 comments
Closed
Labels
A-cargo Area: affects the cargo wrapper (cargo miri) A-tests Area: affects our test suite or CI C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Aug 28, 2017

Here's what we did for an embedded system in another crate: embed-rs/stm32f7-discovery@2b247cf

@oli-obk oli-obk added C-project Category: a larger project is being tracked here, usually with checkmarks for individual steps C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement labels Aug 28, 2017
@RalfJung RalfJung changed the title Try out lld, so we can build dependencies for arbitrary targets Try out lld, so we can cross-build dependencies for arbitrary targets Feb 23, 2019
@RalfJung RalfJung added A-tests Area: affects our test suite or CI A-cargo Area: affects the cargo wrapper (cargo miri) labels Mar 8, 2019
@RalfJung RalfJung removed the C-project Category: a larger project is being tracked here, usually with checkmarks for individual steps label Apr 8, 2019
@RalfJung
Copy link
Member

RalfJung commented Apr 8, 2019

This would also be useful to cross-build libstd: currently, the only reason we need a C toolchain for that is the fact that we build a dylib. We could try to avoid building that (see rust-lang/rust#56443) or we could try to use a linker that works for cross-building (this issue, I guess).

@RalfJung
Copy link
Member

See #864 for another way that we could make Miri work for any target architecture (without having the C toolchains for that installed).

@RalfJung
Copy link
Member

RalfJung commented Mar 1, 2020

I confirmed locally that with #1057 fixed, we don't need lld to cross-compile for other targets. :) With rust-lang/backtrace-rs#297, I was able to cross-build both 64bit and 32bit macOS and Windows libstd on my Linux box, and run a simple file in Miri.

I opened #1198 to track testing that on CI.

@RalfJung RalfJung closed this as completed Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cargo Area: affects the cargo wrapper (cargo miri) A-tests Area: affects our test suite or CI C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

No branches or pull requests

2 participants