Open
Description
We have a zillion tests that use the #![no_core]
hack, like this one:
rust/tests/ui/asm/bad-template.rs
Line 10 in 5e3ede2
A given test involves:
- Host A
- Target B
- Some Rust source (compiled for Target B)
- Test tooling (run on Host A)
Most of our test infra assumes that Host A and Target B are the same thing. This greatly simplifies a lot of assumptions. But this hack we have introduced in so many tests essentially exists so that we can be sure the test runs even when cross-compiling from Host A to Target B. It's possible there's some weird finagling of test flags that can enable this without the hack, but that would be another hack itself. Cross-compiled tests should be relatively easy, like just writing something like:
//@ cross-compile-targets: arch_1-unknown-os_3-env_5 arch_2-unknown-os_4-env_6 arch_1-unknown-os_4-env_5 arch_2-unknown-os_3-env_7
Metadata
Metadata
Assignees
Labels
Area: The compiletest test runnerArea: Cross compilationArea: The testsuite used to check the correctness of rustcCategory: An issue proposing an enhancement or a PR with one.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the compiler team, which will review and decide on the PR/issue.