Merge pull request #6819 from roc-lang/rust-1-77-2-upgrade

Rust 1.77.2 upgrade
This commit is contained in:
Anton-4 2024-07-06 03:23:54 +02:00 committed by GitHub
commit 1bcf30391b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 74 additions and 77 deletions

View file

@ -1157,6 +1157,11 @@ unsafe fn roc_run_native_fast(
enum ExecutableFile {
#[cfg(target_os = "linux")]
MemFd(libc::c_int, PathBuf),
// We store the TempDir in the onDisk variant alongside the path to the executable,
// so that the TempDir doesn't get dropped until after we're done with the path.
// If we didn't do that, then the tempdir would potentially get deleted by the
// TempDir's Drop impl before the file had been executed.
#[allow(dead_code)]
#[cfg(not(target_os = "linux"))]
OnDisk(TempDir, PathBuf),
}
@ -1322,6 +1327,7 @@ fn roc_run_executable_file_path(binary_bytes: &[u8]) -> std::io::Result<Executab
let mut file = OpenOptions::new()
.create(true)
.write(true)
.truncate(true)
.mode(0o777) // create the file as executable
.open(&app_path_buf)?;