fixes for zig tests Windows

This commit is contained in:
Luke Boswell 2023-09-12 19:24:17 +10:00
parent 2f511779a6
commit 2e0c83ae63
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
4 changed files with 21 additions and 16 deletions

View file

@ -160,9 +160,16 @@ pub fn add_default_roc_externs(env: &Env<'_, '_, '_>) {
}
}
unreachable_function(env, "roc_getppid");
unreachable_function(env, "roc_mmap");
unreachable_function(env, "roc_shm_open");
match env.target_info.operating_system {
roc_target::OperatingSystem::Windows => {
// We don't need these functions on Windows
}
_ => {
unreachable_function(env, "roc_getppid");
unreachable_function(env, "roc_mmap");
unreachable_function(env, "roc_shm_open");
}
}
add_sjlj_roc_panic(env)
}