Closed
Description
Since Miri is just an interpreter, there's really no reason that a Linux host shouldn't be able to emulate e.g. a rust lib compiled for a Windows target.
And we are almost there! With #1057 fixed, rust-lang/rust#56443 is no longer a problem -- a check-only libstd build does not need a target toolchain, no object files are created. The only barrier left is rust-lang/backtrace-rs#253, and I just submitted a fix for that. For some targets we also need a small xargo tweak.
With those patches applied, I tried a bunch of things on my Linux host, and they all behave as expected -- pretty amazing. :)
./miri run-debug tests/run-pass/hello.rs --target x86_64-apple-darwin
./miri run-debug tests/run-pass/hello.rs --target i686-apple-darwin
./miri run-debug tests/run-pass/hello.rs --target x86_64-pc-windows-gnu
./miri run-debug tests/run-pass/hello.rs --target x86_64-pc-windows-msvc
./miri run-debug tests/run-pass/hello.rs --target i686-pc-windows-gnu
./miri run-debug tests/run-pass/hello.rs --target i686-pc-windows-msvc
Once the patches all land, we should start testing some of these combinations on CI.
- Test cross-running Linux, macOS and Windows (MSVC) targets on Linux and macOS hosts (Cross-test targets #1249)
- Test cross-running Linux, macOS on Windows hosts (cross-test on a Windows host #1251)
- Test cross-running Windows (GNU) targets (skip copy of windows-gnu libs in check-only mode japaric/xargo#276)