expand zig nix workaround and update issue number

This commit is contained in:
Brendan Hansknecht 2024-12-11 21:31:56 -08:00
parent 7b39066593
commit 3790ddf743
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
3 changed files with 8 additions and 4 deletions

View file

@ -19,7 +19,7 @@ fn main() {
// dunce can be removed once ziglang/zig#5109 is fixed
let bitcode_path = dunce::canonicalize(Path::new(".")).unwrap().join("..");
// workaround for github.com/ziglang/zig/issues/9711
// workaround for github.com/ziglang/zig/issues/20501
#[cfg(target_os = "macos")]
let zig_cache_dir = tempdir().expect("Failed to create temp directory for zig cache");
#[cfg(target_os = "macos")]
@ -69,7 +69,7 @@ fn generate_bc_file(bitcode_path: &Path, zig_object: &str, file_name: &str) {
let dest_bc_64bit = bc_path.to_str().expect("Invalid dest bc path");
println!("Compiling 64-bit bitcode to: {dest_bc_64bit}");
// workaround for github.com/ziglang/zig/issues/9711
// workaround for github.com/ziglang/zig/issues/20501
#[cfg(target_os = "macos")]
let _ = fs::remove_dir_all("./.zig-cache");

View file

@ -19,7 +19,7 @@ fn main() {
// dunce can be removed once ziglang/zig#5109 is fixed
let bitcode_path = dunce::canonicalize(Path::new(".")).unwrap();
// workaround for github.com/ziglang/zig/issues/9711
// workaround for github.com/ziglang/zig/issues/20501
#[cfg(target_os = "macos")]
let zig_cache_dir = tempdir().expect("Failed to create temp directory for zig cache");
#[cfg(target_os = "macos")]
@ -70,6 +70,10 @@ fn generate_object_file(bitcode_path: &Path, zig_object: &str, object_file_name:
println!("Compiling zig object `{zig_object}` to: {src_obj}");
// workaround for github.com/ziglang/zig/issues/20501
#[cfg(target_os = "macos")]
let _ = fs::remove_dir_all("./.zig-cache");
let mut zig_cmd = zig();
zig_cmd