mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-05 02:20:19 +00:00
9e389b9a5f
cfg!()/env!() are applied on the host platform during the build script's build, the environment of the build script's execution is the proper way to determine eg target_os
11 lines
287 B
Rust
11 lines
287 B
Rust
fn main() {
|
|
if std::env::var("CARGO_CFG_TARGET_OS").expect("TARGET_OS not specified") != "windows" {
|
|
return;
|
|
}
|
|
|
|
cc::Build::new()
|
|
.include("exception_handling")
|
|
.file("exception_handling/exception_handling.c")
|
|
.compile("exception_handling");
|
|
}
|