Skip to content

Commit d07454f

Browse files
Rollup merge of #154993 - DeepeshWR:compiletest-custom-target-unstable, r=davidtwco
compiletest: pass -Zunstable-options for unpretty and no-codegen paths 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`).
2 parents 9c01701 + 8563312 commit d07454f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/tools/compiletest/src/runtest.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ impl<'test> TestCx<'test> {
452452
rustc
453453
.arg(input)
454454
.args(&["-Z", &format!("unpretty={}", pretty_type)])
455+
.arg("-Zunstable-options")
455456
.args(&["--target", &self.config.target])
456457
.arg("-L")
457458
.arg(&aux_dir)
@@ -557,6 +558,7 @@ impl<'test> TestCx<'test> {
557558
rustc
558559
.arg("-")
559560
.arg("-Zno-codegen")
561+
.arg("-Zunstable-options")
560562
.arg("--out-dir")
561563
.arg(&out_dir)
562564
.arg(&format!("--target={}", target))

0 commit comments

Comments
 (0)