mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
expand zig nix workaround and update issue number
This commit is contained in:
parent
7b39066593
commit
3790ddf743
3 changed files with 8 additions and 4 deletions
|
@ -1351,7 +1351,7 @@ fn run_build_command(mut command: Command, file_to_build: &str, flaky_fail_count
|
|||
if !cmd_output.status.success() {
|
||||
match std::str::from_utf8(&cmd_output.stderr) {
|
||||
Ok(stderr) => {
|
||||
// flaky error seen on macos 12 apple silicon, related to https://github.com/ziglang/zig/issues/9711
|
||||
// flaky error seen on macos 12 apple silicon, related to https://github.com/ziglang/zig/issues/20501
|
||||
if stderr.contains("unable to save cached ZIR code") {
|
||||
if flaky_fail_counter < max_flaky_fail_count {
|
||||
run_build_command(command, file_to_build, flaky_fail_counter + 1)
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue