Files
wasmtime/crates/runtime/build.rs
Alex Crichton 5b55ba8053 Use sigsetjmp instead of setjmp (#2645)
Apparently on macOS `setjmp` manipulates the process-wide signal mask
which adds a good deal of overhead. We don't actually need this
functionality so this commit switches to using the `sig` version of
setjmp/longjmp where we can explicitly ask the signal mask to not get
preserved. This came out of poking around on #2644 and on macOS locally
thi sdropped the overhead from 721ns to 55ns.
2021-02-08 12:05:11 -06:00

14 lines
317 B
Rust

use std::env;
fn main() {
println!("cargo:rerun-if-changed=src/helpers.c");
cc::Build::new()
.warnings(true)
.define(
&format!("CFG_TARGET_OS_{}", env::var("CARGO_CFG_TARGET_OS").unwrap()),
None,
)
.file("src/helpers.c")
.compile("helpers");
}