From 017b53ce235b3a5affabaf0ddac2980cf8324a45 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Sun, 29 Nov 2020 19:57:04 -0500 Subject: [PATCH] Clean up c_host.o renaming logic --- compiler/build/src/link.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/build/src/link.rs b/compiler/build/src/link.rs index 3bf07c1027..da80187fd3 100644 --- a/compiler/build/src/link.rs +++ b/compiler/build/src/link.rs @@ -132,15 +132,15 @@ pub fn rebuild_host(host_input_path: &Path) { .unwrap(); validate_output("rust_host.o", "rm", output); - } else { - // Clean up rust_host.o + } else if c_host_dest.exists() { + // Clean up c_host.o let output = Command::new("mv") .env_clear() .args(&[c_host_dest, host_dest]) .output() .unwrap(); - validate_output("rust_host.o", "mv", output); + validate_output("c_host.o", "mv", output); } }