nac3core: build script use Path::join

master
ychenfo 2022-01-09 12:06:45 +08:00
parent 8ef9e74aaf
commit 44f4c4f028
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ use regex::Regex;
use std::{ use std::{
env, env,
io::Write, io::Write,
path::Path,
process::{Command, Stdio}, process::{Command, Stdio},
}; };
@ -52,7 +53,7 @@ fn main() {
let mut llvm_as = Command::new("llvm-as") let mut llvm_as = Command::new("llvm-as")
.stdin(Stdio::piped()) .stdin(Stdio::piped())
.arg("-o") .arg("-o")
.arg(&format!("{}/irrt.bc", env::var("OUT_DIR").unwrap())) .arg(Path::new(&env::var("OUT_DIR").unwrap()).join("irrt.bc"))
.spawn() .spawn()
.unwrap(); .unwrap();
llvm_as.stdin.as_mut().unwrap().write_all(filtered_output.as_bytes()).unwrap(); llvm_as.stdin.as_mut().unwrap().write_all(filtered_output.as_bytes()).unwrap();