* Unconditionally use `MemoryImageSlot` This commit removes the internal branching within the pooling instance allocator to sometimes use a `MemoryImageSlot` and sometimes now. Instead this is now unconditionally used in all situations on all platforms. This fixes an issue where the state of a slot could get corrupted if modules being instantiated switched from having images to not having an image or vice versa. The bulk of this commit is the removal of the `memory-init-cow` compile-time feature in addition to adding Windows support to the `cow.rs` file. * Fix compile on Unix * Add a stricter assertion for static memory bounds Double-check that when a memory is allocated the configuration required is satisfied by the pooling allocator.
18 lines
599 B
Rust
18 lines
599 B
Rust
use std::env;
|
|
|
|
fn main() {
|
|
let mut build = cc::Build::new();
|
|
build.warnings(true);
|
|
let arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
|
let os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
|
build.define(&format!("CFG_TARGET_OS_{}", os), None);
|
|
build.define(&format!("CFG_TARGET_ARCH_{}", arch), None);
|
|
if arch == "s390x" {
|
|
println!("cargo:rerun-if-changed=src/trampolines/s390x.S");
|
|
build.file("src/trampolines/s390x.S");
|
|
}
|
|
println!("cargo:rerun-if-changed=src/helpers.c");
|
|
build.file("src/helpers.c");
|
|
build.compile("wasmtime-helpers");
|
|
}
|