make wasm32-wasi default target given zig bug is fixed

This commit is contained in:
Brendan Hansknecht 2023-04-26 07:43:12 -07:00
parent dd8914a75c
commit b26fc9f1af
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -362,21 +362,8 @@ pub fn build_zig_host_wasm32(
unimplemented!("Linking a shared library to wasm not yet implemented");
}
let zig_target = if matches!(opt_level, OptLevel::Development) {
"wasm32-wasi"
} else {
// For LLVM backend wasm we are emitting a .bc file anyway so this target is OK
"i386-linux-musl"
};
// NOTE currently just to get compiler warnings if the host code is invalid.
// the produced artifact is not used
//
// NOTE we're emitting LLVM IR here (again, it is not actually used)
//
// we'd like to compile with `-target wasm32-wasi` but that is blocked on
//
// https://github.com/ziglang/zig/issues/9414
let mut zig_cmd = zig();
zig_cmd
@ -397,7 +384,7 @@ pub fn build_zig_host_wasm32(
"--library",
"c",
"-target",
zig_target,
"wasm32-wasi",
// "-femit-llvm-ir=/home/folkertdev/roc/roc/crates/cli_testing_examples/benchmarks/platform/host.ll",
"-fPIC",
"--strip",