From e74ff3f50a4b7dfef28e6e5b19e1a19e372f5f54 Mon Sep 17 00:00:00 2001 From: Folkert Date: Sat, 12 Nov 2022 00:31:11 +0100 Subject: [PATCH] attempt to get windows to format a path correctly --- crates/compiler/build/src/link.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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",