Add logging of supplimental commands
This commit is contained in:
parent
518414ffd5
commit
c8feaa9b57
@ -21,18 +21,24 @@ pub fn compilation_sequence(ast: AST, sourcefile: &str) {
|
||||
};
|
||||
|
||||
compile_ast(ast, ll_filename);
|
||||
Command::new("llc")
|
||||
let llc_output = Command::new("llc")
|
||||
.arg("-filetype=obj")
|
||||
.arg(ll_filename)
|
||||
.output()
|
||||
.expect("Failed to run llc");
|
||||
|
||||
Command::new("gcc")
|
||||
println!("{}", String::from_utf8_lossy(&llc_output.stdout));
|
||||
println!("{}", String::from_utf8_lossy(&llc_output.stderr));
|
||||
|
||||
let gcc_output = Command::new("gcc")
|
||||
.arg(format!("-o{}", bin_filename))
|
||||
.arg(obj_filename)
|
||||
.output()
|
||||
.expect("failed to run gcc");
|
||||
|
||||
println!("{}", String::from_utf8_lossy(&gcc_output.stdout));
|
||||
println!("{}", String::from_utf8_lossy(&gcc_output.stderr));
|
||||
|
||||
for filename in [obj_filename].iter() {
|
||||
Command::new("rm")
|
||||
.arg(filename)
|
||||
|
Loading…
Reference in New Issue
Block a user