Skip to content
Open
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
2 changes: 1 addition & 1 deletion crates/project-model/src/toolchain_info/rustc_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ fn rustc_print_cfg(
};

let mut cmd = sysroot.tool(Tool::Rustc, current_dir, extra_env);
cmd.args(RUSTC_ARGS);
cmd.args(["-Z", "unstable-options"]).args(RUSTC_ARGS);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That will break the command for all stable toolchains

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We could heuristically check if the target ends with .json, emit this option + adding RUSTC_BOOTSTRAP=1 to the environment

cmd.arg("-O");
if let Some(target) = target {
cmd.args(["--target", target]);
Expand Down
Loading