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);
|
compile_ast(ast, ll_filename);
|
||||||
Command::new("llc")
|
let llc_output = Command::new("llc")
|
||||||
.arg("-filetype=obj")
|
.arg("-filetype=obj")
|
||||||
.arg(ll_filename)
|
.arg(ll_filename)
|
||||||
.output()
|
.output()
|
||||||
.expect("Failed to run llc");
|
.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(format!("-o{}", bin_filename))
|
||||||
.arg(obj_filename)
|
.arg(obj_filename)
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to run gcc");
|
.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() {
|
for filename in [obj_filename].iter() {
|
||||||
Command::new("rm")
|
Command::new("rm")
|
||||||
.arg(filename)
|
.arg(filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user