Merge remote-tracking branch 'origin/main' into glue-getters-rtfeldman

This commit is contained in:
Folkert 2023-02-22 21:11:39 +01:00
commit 0d4135c57a
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
95 changed files with 5408 additions and 1860 deletions

View file

@ -792,7 +792,14 @@ pub fn rebuild_host(
// For surgical linking, just copy the dynamically linked rust app.
let mut exe_path = cargo_out_dir.join("host");
exe_path.set_extension(executable_extension);
std::fs::copy(&exe_path, &host_dest).unwrap();
if let Err(e) = std::fs::copy(&exe_path, &host_dest) {
panic!(
"unable to copy {} => {}: {:?}\n\nIs the file used by another invocation of roc?",
exe_path.display(),
host_dest.display(),
e,
);
}
} else {
// Cargo hosts depend on a c wrapper for the api. Compile host.c as well.