Merge pull request #284 from fanatid/patch-1

Use CARGO_CFG_TARGET_ARCH instead TARGET in build.rs
This commit is contained in:
Andrew Poelstra 2021-03-12 19:18:24 +00:00 committed by GitHub
commit 4ae0e7ebd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -51,10 +51,9 @@ fn main() {
#[cfg(feature = "recovery")] #[cfg(feature = "recovery")]
base_config.define("ENABLE_MODULE_RECOVERY", Some("1")); base_config.define("ENABLE_MODULE_RECOVERY", Some("1"));
match &env::var("TARGET").unwrap() as &str { // Header files. WASM only.
"wasm32-unknown-unknown"|"wasm32-wasi" => if env::var("CARGO_CFG_TARGET_ARCH").unwrap() == "wasm32" {
{ base_config.include("wasm-sysroot"); }, base_config.include("wasm-sysroot");
_ => {},
} }
// secp256k1 // secp256k1