Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,9 @@ impl TargetCfgs {
// actually be changed with `-C` flags.
for config in query_rustc_output(
config,
&["--print=cfg", "--target", &config.target],
// `-Zunstable-options` is necessary when compiletest is running with custom tests (such
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: “custom tests” → “custom targets”?

// as synthetic targets used to bless mir-opt tests).
&["-Zunstable-options", "--print=cfg", "--target", &config.target],
Default::default(),
)
.trim()
Expand Down
5 changes: 5 additions & 0 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,11 @@ impl<'test> TestCx<'test> {
if self.props.force_host { &*self.config.host } else { &*self.config.target };

compiler.arg(&format!("--target={}", target));
if target.ends_with(".json") {
// `-Zunstable-options` is necessary when compiletest is running with custom tests
// (such as synthetic targets used to bless mir-opt tests).
compiler.arg("-Zunstable-options");
}
}
self.set_revision_flags(&mut compiler);

Expand Down
Loading