diff --git a/src/tools/build-manifest/build.rs b/src/tools/build-manifest/build.rs index c804921408a93..3ecfd30b8260d 100644 --- a/src/tools/build-manifest/build.rs +++ b/src/tools/build-manifest/build.rs @@ -60,7 +60,7 @@ fn main() { let mut output = String::new(); writeln!(output, "static HOSTS: &[&str] = &[").unwrap(); - for host in targets.hosts { + for host in &targets.hosts { writeln!(output, " {:?},", host).unwrap(); } writeln!(output, "];").unwrap(); @@ -71,6 +71,22 @@ fn main() { } writeln!(output, "];").unwrap(); + writeln!(output, "static MSI_INSTALLERS: &[&str] = &[").unwrap(); + for host in &targets.hosts { + if host.contains("-windows-") { + writeln!(output, " {:?},", host).unwrap(); + } + } + writeln!(output, "];").unwrap(); + + writeln!(output, "static MINGW: &[&str] = &[").unwrap(); + for host in targets.hosts { + if host.contains("-windows-gnu") { + writeln!(output, " {:?},", host).unwrap(); + } + } + writeln!(output, "];").unwrap(); + std::fs::write(PathBuf::from(std::env::var_os("OUT_DIR").unwrap()).join("targets.rs"), output) .unwrap(); } diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index d646d9102ba3e..42db12e5e1173 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -29,18 +29,8 @@ static DOCS_FALLBACK: &[(&str, &str)] = &[ ("", "x86_64-unknown-linux-gnu"), ]; -static MSI_INSTALLERS: &[&str] = &[ - "aarch64-pc-windows-msvc", - "i686-pc-windows-gnu", - "i686-pc-windows-msvc", - "x86_64-pc-windows-gnu", - "x86_64-pc-windows-msvc", -]; - static PKG_INSTALLERS: &[&str] = &["x86_64-apple-darwin", "aarch64-apple-darwin"]; -static MINGW: &[&str] = &["i686-pc-windows-gnu", "x86_64-pc-windows-gnu"]; - static NIGHTLY_ONLY_COMPONENTS: &[PkgType] = &[PkgType::Miri, PkgType::JsonDocs, PkgType::RustcCodegenCranelift];