Skip to content

compiletest: pass -Zunstable-options for unpretty and no-codegen paths#154993

Open
DeepeshWR wants to merge 1 commit intorust-lang:mainfrom
DeepeshWR:compiletest-custom-target-unstable
Open

compiletest: pass -Zunstable-options for unpretty and no-codegen paths#154993
DeepeshWR wants to merge 1 commit intorust-lang:mainfrom
DeepeshWR:compiletest-custom-target-unstable

Conversation

@DeepeshWR
Copy link
Copy Markdown
Contributor

When using custom targets via RUST_TARGET_PATH, compiletest does not
consistently pass -Zunstable-options in all code paths.

In particular, unpretty and -Zno-codegen (typecheck) paths invoke
rustc without -Zunstable-options, which causes failures when the
target is not built-in.

Pass -Zunstable-options in these code paths to ensure consistent
behavior when using custom targets.

This primarily affects setups using custom targets without .json
suffix (resolved via RUST_TARGET_PATH).

Unconditionally pass -Zunstable-options in the `unpretty` and
`-Zno-codegen` (typecheck) paths in compiletest. This ensures
custom targets resolved via RUST_TARGET_PATH work consistently.

This is primarily needed when using non-built-in targets without
a .json extension.

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 8, 2026

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2026
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 8, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 8, 2026

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @jieyouxu, @oli-obk, @wesleywiser, bootstrap
  • @jieyouxu, @oli-obk, @wesleywiser, bootstrap expanded to 8 candidates
  • Random selection from Mark-Simulacrum, clubby789, wesleywiser

@DeepeshWR
Copy link
Copy Markdown
Contributor Author

cc @davidtwco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants