diff --git a/crates/compiler/build/src/link.rs b/crates/compiler/build/src/link.rs index ca83ce3a15..d2f1f976e8 100644 --- a/crates/compiler/build/src/link.rs +++ b/crates/compiler/build/src/link.rs @@ -1208,12 +1208,18 @@ fn link_wasm32( // include wasi libc // using `-lc` is broken in zig 8 (and early 9) in combination with ReleaseSmall wasi_libc_path.to_str().unwrap(), - &format!("-femit-bin={}", output_path.to_str().unwrap()), + &format!( + "-femit-bin={}", + output_path.display().to_string().trim_start_matches(r"\\?") + ), "-target", "wasm32-wasi-musl", "--pkg-begin", "str", - zig_str_path.to_str().unwrap(), + zig_str_path + .display() + .to_string() + .trim_start_matches(r"\\?"), "--pkg-end", "--strip", "-O",