Skip to content

Commit 0a91f2b

Browse files
committed
Use CARGO_CFG_TARGET_ARCH instead TARGET in build.rs
1 parent 3bff596 commit 0a91f2b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

secp256k1-sys/build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ fn main() {
5151
#[cfg(feature = "recovery")]
5252
base_config.define("ENABLE_MODULE_RECOVERY", Some("1"));
5353

54-
match &env::var("TARGET").unwrap() as &str {
55-
"wasm32-unknown-unknown"|"wasm32-wasi" =>
56-
{ base_config.include("wasm-sysroot"); },
57-
_ => {},
54+
// Header files. WASM only.
55+
if env::var("CARGO_CFG_TARGET_ARCH").unwrap() == "wasm32" {
56+
base_config.include("wasm-sysroot");
5857
}
5958

6059
// secp256k1

0 commit comments

Comments
 (0)