fix parallel compilation

This commit is contained in:
Sebastien Bourdeauducq 2021-09-22 15:00:32 +08:00
parent d561450bf5
commit 8acb39f31f
2 changed files with 2 additions and 2 deletions

View File

@ -8,5 +8,5 @@ if [ -z "$1" ]; then
fi
../../target/release/nac3standalone $1
clang -Wall -O2 -o $1.elf demo.c $1.o
clang -Wall -O2 -o $1.elf demo.c module*.o
./$1.elf

View File

@ -141,7 +141,7 @@ fn main() {
)
.expect("couldn't create target machine");
target_machine
.write_to_file(module, FileType::Object, Path::new(&(demo_name.to_owned() + ".o")))
.write_to_file(module, FileType::Object, Path::new(&format!("{}.o", module.get_name().to_str().unwrap())))
.expect("couldn't write module to file");
// println!("IR:\n{}", module.print_to_string().to_str().unwrap());