Commit a2c35526 authored by John van Groningen's avatar John van Groningen

if the code generator fails print the name of the .abc file

parent 764daec6
......@@ -587,14 +587,16 @@ CodeGen cgen` used_compiler_process_ids wf genAsmOrCode abc_path obj_path timepr
// , command
// , startupdir
] ps)
# code_generator_failed_message = "Error: Code generator failed for '" +++ abc_path +++ "' with exit code: "+++toString exit_code
# ((_, errors_not_empty, error_text),ps) = accFiles (ReadErrorsAndWarnings errorsfilename) ps
ps = (if errors_not_empty
(wf (StrictListToList error_text))
( if (exit_code <> 0)
(wf ["Error: Code generator failed for '" +++ abc_path +++ "' with exit code: "+++toString exit_code,(quoted_string path_without_suffix)])
id
)
) ps
ps = (if errors_not_empty
(if (exit_code <> 0)
(wf (StrictListToList error_text++[code_generator_failed_message]))
(wf (StrictListToList error_text)))
(if (exit_code <> 0)
(wf [code_generator_failed_message,quoted_string path_without_suffix])
id)
) ps
= (obj_path,exit_code==0,compiler_process_ids,ps)
:: StartedCodeGenerator = !{
......@@ -630,12 +632,15 @@ finish_code_generator process_handle {scg_thread_handle,scg_std_error_handle,scg
| os<>99
= undef
# ((_, errors_not_empty, error_text),ps) = accFiles (ReadErrorsAndWarnings scg_errors_file_name) ps
code_generator_failed_message = "Error: Code generator failed for '" +++ scg_abc_path +++ "' with exit code: "+++toString exit_code
ps = (if errors_not_empty
(wf (StrictListToList error_text))
(if (exit_code <> 0)
(wf ["Error: Code generator failed for '" +++ scg_abc_path +++ "' with exit code: "+++toString exit_code,(quoted_string scg_path_without_suffix)])
id
)
(if (exit_code <> 0)
(wf (StrictListToList error_text ++ [code_generator_failed_message]))
(wf (StrictListToList error_text)))
(if (exit_code <> 0)
(wf [code_generator_failed_message,quoted_string scg_path_without_suffix])
id
)
) ps
= (exit_code==0,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