fix warning when linking

This commit is contained in:
Brendan Hansknecht 2023-04-26 08:24:35 -07:00
parent b26fc9f1af
commit 44a1b5d41f
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
2 changed files with 11 additions and 4 deletions

View file

@ -1267,8 +1267,6 @@ fn link_wasm32(
input_paths: &[&str],
_link_type: LinkType,
) -> io::Result<(Child, PathBuf)> {
let wasi_libc_path = find_wasi_libc_path();
let child = zig()
// .env_clear()
// .env("PATH", &env_path)
@ -1276,8 +1274,9 @@ fn link_wasm32(
.args(input_paths)
.args([
// include wasi libc
// TOOD: This now compiles fine with `-lc`. That said, the output file doesn't work.
// using `-lc` is broken in zig 8 (and early 9) in combination with ReleaseSmall
wasi_libc_path.to_str().unwrap(),
find_wasi_libc_path().to_str().unwrap(),
&format!("-femit-bin={}", output_path.to_str().unwrap()),
"-target",
"wasm32-wasi-musl",