From d571910f4dd057d26c7c2f483a4b3a813e292d00 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sat, 19 Jun 2021 14:07:56 +0200 Subject: [PATCH] Give an error when attempting to build for MSVC --- y.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/y.rs b/y.rs index 27ab44f5870..55457745d25 100755 --- a/y.rs +++ b/y.rs @@ -127,6 +127,14 @@ fn main() { host_triple.clone() }; + if target_triple.ends_with("-msvc") { + eprintln!("The MSVC toolchain is not yet supported by rustc_codegen_cranelift."); + eprintln!("Switch to the MinGW toolchain for Windows support."); + eprintln!("Hint: You can use `rustup set default-host x86_64-pc-windows-gnu` to"); + eprintln!("set the global default target to MinGW"); + process::exit(1); + } + let cg_clif_dylib = build_backend::build_backend(channel); build_sysroot::build_sysroot( channel,