diff --git a/build_system/build_backend.rs b/build_system/build_backend.rs index ddc099b5388..48faec8bc4b 100644 --- a/build_system/build_backend.rs +++ b/build_system/build_backend.rs @@ -39,5 +39,5 @@ pub(crate) fn build_backend( eprintln!("[BUILD] rustc_codegen_cranelift"); super::utils::spawn_and_wait(cmd); - Path::new("target").join(&host_triple).join(&channel) + Path::new("target").join(host_triple).join(channel) } diff --git a/build_system/mod.rs b/build_system/mod.rs index 0124d47de75..3a6d58a2a6d 100644 --- a/build_system/mod.rs +++ b/build_system/mod.rs @@ -73,7 +73,7 @@ pub fn main() { 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); + process::exit(1); } @@ -83,7 +83,7 @@ pub fn main() { if args.next().is_some() { arg_error!("./y.rs prepare doesn't expect arguments"); } - prepare::prepare(&target_triple); + prepare::prepare(&host_triple); process::exit(0); } Some("build") => Command::Build, diff --git a/build_system/prepare.rs b/build_system/prepare.rs index 4580c4b6549..b499aaa703c 100644 --- a/build_system/prepare.rs +++ b/build_system/prepare.rs @@ -8,7 +8,7 @@ use std::process::Command; use super::rustc_info::{get_file_name, get_rustc_path, get_rustc_version}; use super::utils::{copy_dir_recursively, spawn_and_wait}; -pub(crate) fn prepare(target_triple: &str) { +pub(crate) fn prepare(host_triple: &str) { prepare_sysroot(); eprintln!("[INSTALL] hyperfine"); @@ -49,8 +49,8 @@ pub(crate) fn prepare(target_triple: &str) { build_cmd.arg("build").env_remove("CARGO_TARGET_DIR").current_dir("simple-raytracer"); spawn_and_wait(build_cmd); fs::copy( - Path::new("simple-raytracer/target/debug").join(get_file_name("main", "bin", target_triple)), - Path::new("simple-raytracer").join(get_file_name("raytracer_cg_llvm", "bin", target_triple)), + Path::new("simple-raytracer/target/debug").join(get_file_name("main", "bin", host_triple)), + Path::new("simple-raytracer").join(get_file_name("raytracer_cg_llvm", "bin", host_triple)), ) .unwrap(); }