Revert "Try fixing the Killed: 9 problem on M1 Mac"

(this didn't fix it)

This reverts commit 089a3de22f.
This commit is contained in:
Richard Feldman 2022-04-15 09:42:44 -04:00
parent 089a3de22f
commit 0b979ebe1e
No known key found for this signature in database
GPG Key ID: 7E4127D1E4241798
2 changed files with 0 additions and 21 deletions

View File

@ -255,13 +255,6 @@ pub fn build_file<'a>(
} else if matches!(link_type, LinkType::None) { } else if matches!(link_type, LinkType::None) {
// Just copy the object file to the output folder. // Just copy the object file to the output folder.
binary_path.set_extension(app_extension); binary_path.set_extension(app_extension);
if cfg!(target_os = "macos") {
// See https://apple.stackexchange.com/a/428388
// for why we need to remove the file before copying it.
std::fs::remove_file(&binary_path).unwrap();
}
std::fs::copy(app_o_file, &binary_path).unwrap(); std::fs::copy(app_o_file, &binary_path).unwrap();
BuildOutcome::NoProblems BuildOutcome::NoProblems
} else { } else {
@ -353,13 +346,6 @@ fn spawn_rebuild_thread(
if surgically_link { if surgically_link {
// Copy preprocessed host to executable location. // Copy preprocessed host to executable location.
let prehost = host_input_path.with_file_name("preprocessedhost"); let prehost = host_input_path.with_file_name("preprocessedhost");
if cfg!(target_os = "macos") {
// See https://apple.stackexchange.com/a/428388
// for why we need to remove the file before copying it.
std::fs::remove_file(&binary_path).unwrap();
}
std::fs::copy(prehost, binary_path.as_path()).unwrap(); std::fs::copy(prehost, binary_path.as_path()).unwrap();
} }
let rebuild_host_end = rebuild_host_start.elapsed().unwrap(); let rebuild_host_end = rebuild_host_start.elapsed().unwrap();

View File

@ -499,13 +499,6 @@ pub fn rebuild_host(
if shared_lib_path.is_some() { if shared_lib_path.is_some() {
// For surgical linking, just copy the dynamically linked rust app. // For surgical linking, just copy the dynamically linked rust app.
if cfg!(target_os = "macos") {
// See https://apple.stackexchange.com/a/428388
// for why we need to remove the file before copying it.
std::fs::remove_file(&host_dest_native).unwrap();
}
std::fs::copy(cargo_out_dir.join("host"), host_dest_native).unwrap(); std::fs::copy(cargo_out_dir.join("host"), host_dest_native).unwrap();
} else { } else {
// Cargo hosts depend on a c wrapper for the api. Compile host.c as well. // Cargo hosts depend on a c wrapper for the api. Compile host.c as well.