From 751c6f65bd0430f9676b650a6437a6252cced6bc Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 18 Jan 2017 03:19:15 -0800 Subject: [PATCH] Deleted some code in compilation --- src/compilation.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/compilation.rs b/src/compilation.rs index 29dd773..bced0b7 100644 --- a/src/compilation.rs +++ b/src/compilation.rs @@ -29,17 +29,14 @@ pub fn compilation_sequence(ast: AST, sourcefile: &str) { .expect("Error writing file"); let llc_output = Command::new("llc") - .arg("-filetype=obj") - .arg(ll_filename) + .args(&["-filetype=obj", ll_filename, "-o", obj_filename]) .output() .expect("Failed to run llc"); - 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) + .args(&["-o", bin_filename, &obj_filename]) .output() .expect("failed to run gcc");