-output-obj leaves a C file in case of Reference to undefined global #5593
Original bug ID: 5593
Consider a file a.ml with a reference to Unix.
The following command line fails as expected:
$ ocamlc -output-obj -o a.c a.cmo
But it leaves an incomplete file a.c. This is annoying because if one then fixes the command-line, the compiler refuses to overwrite this file:
$ ocamlc -output-obj -o a.c unix.cma a.cmo
I suggest to have "ocamlc -output-obj" removes its output in case of a linking error.
The text was updated successfully, but these errors were encountered: