Skip to content

Commit d571910

Browse files
committed
Give an error when attempting to build for MSVC
1 parent bc67726 commit d571910

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

y.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ fn main() {
127127
host_triple.clone()
128128
};
129129

130+
if target_triple.ends_with("-msvc") {
131+
eprintln!("The MSVC toolchain is not yet supported by rustc_codegen_cranelift.");
132+
eprintln!("Switch to the MinGW toolchain for Windows support.");
133+
eprintln!("Hint: You can use `rustup set default-host x86_64-pc-windows-gnu` to");
134+
eprintln!("set the global default target to MinGW");
135+
process::exit(1);
136+
}
137+
130138
let cg_clif_dylib = build_backend::build_backend(channel);
131139
build_sysroot::build_sysroot(
132140
channel,

0 commit comments

Comments
 (0)