Rework `run-make-support`'s `target` to be a structured API
Open
@jieyouxu is already working on this.
Since Sep 7, 2026.
A-run-make
A-testsuite
C-enhancement
T-bootstrap
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
run-make tests often need to have target-specific behavior (or have a distinction between host / target). We should make support for that properly structured and not via substring matching. E.g. instead of the various is_windows_msvc and target helpers, introduce a structured target API:
fn host() -> TargetInfo;
fn target() -> Targetinfo;
#[non_exhaustive]
pub struct TargetInfo {
pub target_tuple: String,
pub arch: Arch, // possibly with a subarch too
pub env: Env, // with a Env::None
pub os: Os, // with a Os::None
pub vendor: Vendor, // with a Vendor::None
pub target_family: TargetFamily, // with a TargetFamily::None
}
Also, consider changing the run-make test <-> run_make_support <-> compiletest env vars to be prefixed as internal-only, then only "publicly" expose this to run-make tests.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.