build.rs: patch out any calls to `printf`
This commit is contained in:
parent
51dab7ac04
commit
942a0e5e2c
|
@ -20,11 +20,16 @@ fn main() {
|
|||
.include("depend/secp256k1/include")
|
||||
.include("depend/secp256k1/src")
|
||||
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
|
||||
.flag_if_supported("-Wno-unused-parameter") // patching out printf causes this warning
|
||||
.define("SECP256K1_API", Some(""))
|
||||
.define("ENABLE_MODULE_ECDH", Some("1"))
|
||||
.define("ENABLE_MODULE_SCHNORRSIG", Some("1"))
|
||||
.define("ENABLE_MODULE_EXTRAKEYS", Some("1"))
|
||||
.define("ENABLE_MODULE_ELLSWIFT", Some("1"));
|
||||
.define("ENABLE_MODULE_ELLSWIFT", Some("1"))
|
||||
// upstream sometimes introduces calls to printf, which we cannot compile
|
||||
// with WASM due to its lack of libc. printf is never necessary and we can
|
||||
// just #define it away.
|
||||
.define("printf(...)", Some(""));
|
||||
|
||||
if cfg!(feature = "lowmemory") {
|
||||
base_config.define("ECMULT_WINDOW_SIZE", Some("4")); // A low-enough value to consume negligible memory
|
||||
|
|
Loading…
Reference in New Issue