rust-lang / rust-lang/rust

run-make: audit `//@ ignore-cross-compile` rmake.rs tests

Open
#126,264 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-run-make A-testsuite C-cleanup T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

tools.mk's $(RUSTC) doesn't pass --target $TARGET, which breaks for example tests/run-make/inaccessible-temp-dir/Makefile (https://github.com/rust-lang/rust/commit/1d847b86593d79511ddc78aa374c0f20536a449c). We should try to see if we can make the ported rmake.rs tests work even in cross-compile scenarios.

We should experiment with modifying rustc() in run-make-support such that we supply to it:

  • --target $TARGET
  • HOST_RPATH_ENV (or was it _DIR?)
  • TARGET_RPATH_ENV (or was it _DIR?)

If a run-make test can't be run when cross-compiled, we should at least document why (for example the compiled binary needs to be run).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading tools.mk and the rustc() entry point in run-make-support, then inspect tests/run-make/inaccessible-temp-dir/Makefile and the run-make tests marked //@ ignore-cross-compile. Experiment with the listed target and rpath arguments. Done means cross-compiled tests work where possible, while tests that require running a compiled binary document why they remain ignored.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.