From 44f4c4f028d1ecdeda69ba359efe45b1a9ce215b Mon Sep 17 00:00:00 2001 From: ychenfo Date: Sun, 9 Jan 2022 12:06:45 +0800 Subject: [PATCH] nac3core: build script use Path::join --- nac3core/build.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nac3core/build.rs b/nac3core/build.rs index c3bff8eb3..b2eda85fb 100644 --- a/nac3core/build.rs +++ b/nac3core/build.rs @@ -2,6 +2,7 @@ use regex::Regex; use std::{ env, io::Write, + path::Path, process::{Command, Stdio}, }; @@ -52,7 +53,7 @@ fn main() { let mut llvm_as = Command::new("llvm-as") .stdin(Stdio::piped()) .arg("-o") - .arg(&format!("{}/irrt.bc", env::var("OUT_DIR").unwrap())) + .arg(Path::new(&env::var("OUT_DIR").unwrap()).join("irrt.bc")) .spawn() .unwrap(); llvm_as.stdin.as_mut().unwrap().write_all(filtered_output.as_bytes()).unwrap();