mirror of
https://github.com/mii443/wasmer.git
synced 2025-09-01 23:19:14 +00:00
20 lines
466 B
Rust
20 lines
466 B
Rust
//! Runtime build script compiles C code using setjmp for trap handling.
|
|
|
|
use std::env;
|
|
|
|
fn main() {
|
|
println!("cargo:rerun-if-changed=src/trap/handlers.c");
|
|
|
|
cc::Build::new()
|
|
.warnings(true)
|
|
.define(
|
|
&format!(
|
|
"CFG_TARGET_OS_{}",
|
|
env::var("CARGO_CFG_TARGET_OS").unwrap().to_uppercase()
|
|
),
|
|
None,
|
|
)
|
|
.file("src/trap/handlers.c")
|
|
.compile("handlers");
|
|
}
|