-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Testing a cross-compiled toolchain #108914
Comments
I took a look at some of the test failures, and they all seem to be related to the verbosity of error messages. For example, src/test/ui/borrowck/borrowck-move-out-of-overloaded-auto-deref.rs reports the following diff:
From digging into the code, I wonder if |
Maybe copy over the output toolchain into the appropriate |
I tried your suggestion, and it doesn't work. Or, at least, it's not straightforward. The contents of the stageX directories don't neatly correspond to a packaged toolchain. For example, I have stage1, stage1-std, and stage1-rustc directories, so I would probably have to do some surgery on the packaged toolchain and figure out where each bit came from, and where to restore it. It seems like that is likely to be brittle. It also did a bunch of unnecessary work, including building LLVM, before finally failing with:
|
This is about missing the source for libstd, not the verbosity. Don't know why that would vary between machines; maybe the absolute path to the repository is getting embedded into rustc at build time somehow? In general, I don't want to spend very much time at all trying to support this; bootstrap already tries to support far too many use cases and we have no way to test "a toolchain built on one machine but run on another" in CI. |
This is helpful. I will see if I can figure out why we can't find the libstd sources. I sympathize with your observation about testability. It would improve our testing, but make it harder for you. |
Just to close the loop, since I didn't mention it earlier: It is possible for us to build natively on Windows, just more awkward. We will probably try that route, which has the advantage of being what the official version of x86_64-pc-windows-gnu does. |
We (Android platform) build a custom version of rustc. Basically, we take the source distro, apply a few patches, and run x.py with a custom config.toml.
I am working on 2 things, which are related:
We want to build a Rust toolchain that runs on Windows (MinGW). For various reasons, we'd prefer to do this by cross-compiling (i.e. build a Windows rustc on a Linux machine).
We want to test our toolchain in our CI pipeline. For example, run
x.py test tests/ui
So, I had the following "clever" idea:
x.py --stage 0 test tests/ui
with the stage 0 / bootstrap configured to use my new toolchain.I got a very helpful warning that I probably shouldn't be doing this, and inviting me to file this issue. When I proceeded anyway, with
COMPILETEST_FORCE_STAGE0=1
, I got a number of test failures (~200 out of ~13,000). (For comparison, when I ranx.py test tests/ui
the "right" way, the tests all passed, so I'm pretty confident the failures weren't due to our patches and custom configuration.)Is there a correct, supported way to do this? That is, run tests "after-the-fact" on a toolchain you just built, possibly on a different machine? If not, I am willing to add support for it, if there is interest.
I found several things that seemed related, but not quite right:
./x.py test distcheck
applies to a source tarball, not a compiled toolchain.The text was updated successfully, but these errors were encountered: