rust-lang / rust-lang/rust

`compiletest` compile-flags forwarding between current test crate and auxiliaries/minicore is iffy

Open
#147,881 7 comments 0 reactions 1 assignee View on GitHub

@jieyouxu is already working on this.

Since Aug 18, 2026.

A-compiletest A-compiletest-directives C-bug E-hard T-compiler
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I took a closer look -- as is tradition, this is a bit of a mess in compiletest. The gist though is that make_compile_args is needed for the preset compiler flags that ui (or other test modes) should respectively get, except we don't properly or explicitly tell apart:

  1. Compiler flags that should be set for all ui tests (unless overriden), which includes auxiliaries or minicore when built as an auxiliary under the test mode
  2. Compiler flags that should be set for the current test crate itself, versus auxiliaries, versus minicore

I would say that we probably should not be forwarding compiler flags in the general case (... or provide an opt-out to stop that behavior), because yeah with something like target features, it's not exactly obvious or easy to disable...

Originally posted by @jieyouxu in https://github.com/rust-lang/rust/issues/147812#issuecomment-3419590599

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.