attempt to get windows to format a path correctly

This commit is contained in:
Folkert 2022-11-12 00:31:11 +01:00
parent ce61a40f5b
commit e74ff3f50a
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -1208,12 +1208,18 @@ fn link_wasm32(
// include wasi libc // include wasi libc
// using `-lc` is broken in zig 8 (and early 9) in combination with ReleaseSmall // using `-lc` is broken in zig 8 (and early 9) in combination with ReleaseSmall
wasi_libc_path.to_str().unwrap(), 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", "-target",
"wasm32-wasi-musl", "wasm32-wasi-musl",
"--pkg-begin", "--pkg-begin",
"str", "str",
zig_str_path.to_str().unwrap(), zig_str_path
.display()
.to_string()
.trim_start_matches(r"\\?"),
"--pkg-end", "--pkg-end",
"--strip", "--strip",
"-O", "-O",