Change a file extension .o -> .wasm to make Zig emit wasm

Zig 0.9 would prioritise the -target but now it seems to prioritise the file extension
This commit is contained in:
Brian Carroll 2022-08-25 21:32:31 +01:00 committed by Brendan Hansknecht
parent f8b787c93a
commit a590fafa76
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -121,12 +121,12 @@ fn build_wasm_test_host() {
fn build_wasm_platform(out_dir: &str, source_path: &str) -> PathBuf {
let mut outfile = PathBuf::from(out_dir).join(PLATFORM_FILENAME);
outfile.set_extension("o");
outfile.set_extension("wasm");
run_zig(&[
"build-lib",
"-target",
"wasm32-wasi",
"wasm32-wasi-musl",
"-lc",
source_path,
&format!("-femit-bin={}", outfile.to_str().unwrap()),