From 3a286e273fc61eae260456b975cd03ddcebdbba2 Mon Sep 17 00:00:00 2001 From: Charlie Hills Date: Tue, 6 Jun 2023 23:40:08 -0400 Subject: [PATCH] Use RUSTC env var to locate rustc --- build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 20cf4a0..9acb418 100644 --- a/build.rs +++ b/build.rs @@ -24,8 +24,9 @@ fn check_func(function_name: &str) -> bool { writeln!(&mut test_file, " }}").unwrap(); writeln!(&mut test_file, "}}").unwrap(); } - - let output = Command::new("rustc"). + + let rustc = env::var("RUSTC").unwrap(); + let output = Command::new(rustc). arg(&test_file_name). arg("--out-dir").arg(&out_dir). arg("-l").arg("udev").