Remove object file directly rather than running "rm". Close #1778 also.
This commit is contained in:
parent
0973bccfe2
commit
b994b17be8
@ -700,7 +700,10 @@ fn link_binary(sess: session,
|
||||
|
||||
// Remove the temporary object file if we aren't saving temps
|
||||
if !sess.opts.save_temps {
|
||||
run::run_program("rm", [obj_filename]);
|
||||
if ! os::remove_file(obj_filename) {
|
||||
sess.warn(#fmt["failed to delete object file '%s'",
|
||||
obj_filename]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user