diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-03-20 12:39:40 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-03-20 12:39:40 -0700 |
| commit | b994b17be807c7041e8d29b628df238d2a0cb0c9 (patch) | |
| tree | 7b54a942eada1f9c9007af06f2cf2df3e1736fb6 /src/rustc | |
| parent | 0973bccfe2bf1140021a3f670974bf073bfb5eac (diff) | |
| download | rust-b994b17be807c7041e8d29b628df238d2a0cb0c9.tar.gz rust-b994b17be807c7041e8d29b628df238d2a0cb0c9.zip | |
Remove object file directly rather than running "rm". Close #1778 also.
Diffstat (limited to 'src/rustc')
| -rw-r--r-- | src/rustc/back/link.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rustc/back/link.rs b/src/rustc/back/link.rs index 4ff6e330797..5a05bc7c124 100644 --- a/src/rustc/back/link.rs +++ b/src/rustc/back/link.rs @@ -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]); + } } } // |
