Commit 764daec6 authored by Jurrien Stutterheim's avatar Jurrien Stutterheim

Don't call the system as (committing for testing purposes)

parent 437bb1e7
......@@ -297,33 +297,33 @@ CodeGen cgen used_compiler_process_ids wf genAsmOrCode abc_path obj_path timepro
(wf ["Error: Code generator failed for '"+++abc_path+++"' with exit code: "+++toString exit_code,(quoted_string path_without_suffix)] ps)
ps
)
| exit_code<>0
= (obj_path,exit_code==0,compiler_process_ids,ps)
# assembly_path_name = path_without_suffix+++".s"
# assembler_path_name = "/usr/bin/as"
# (argv,args_memory) = make_argv [assembler_path_name,"-o",obj_path,assembly_path_name]
# assembler_pid = fork
| assembler_pid<0
= abort "fork failed"
| assembler_pid==0
| execv (assembler_path_name+++"\0") argv<0
= abort "execv failed for assembler in function CodeGen"
= abort "execution continued after execv"
| free args_memory<0
= abort "free failed"
# (w_pid,status) = wait_pid assembler_pid 0
| w_pid <> -1 && w_pid<>assembler_pid
= abort "waitpid failed"
# result = (status bitand 0xff00) >> 8
# wtermsig = status bitand 0x7f
| wtermsig<>0
= abort "assembler exited abnormally"
| unlink (assembly_path_name+++"\0")<>0
= abort "deleting the assembler file failed"
//| exit_code<>0
//= (obj_path,exit_code==0,compiler_process_ids,ps)
//# assembly_path_name = path_without_suffix+++".s"
//# assembler_path_name = "/usr/bin/as"
//# (argv,args_memory) = make_argv [assembler_path_name,"-o",obj_path,assembly_path_name]
//# assembler_pid = fork
//| assembler_pid<0
//= abort "fork failed"
//| assembler_pid==0
//| execv (assembler_path_name+++"\0") argv<0
//= abort "execv failed for assembler in function CodeGen"
//= abort "execution continued after execv"
//| free args_memory<0
//= abort "free failed"
//# (w_pid,status) = wait_pid assembler_pid 0
//| w_pid <> -1 && w_pid<>assembler_pid
//= abort "waitpid failed"
//# result = (status bitand 0xff00) >> 8
//# wtermsig = status bitand 0x7f
//| wtermsig<>0
//= abort "assembler exited abnormally"
//| unlink (assembly_path_name+++"\0")<>0
//= abort "deleting the assembler file failed"
= (obj_path,exit_code==0,compiler_process_ids,ps)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment