Skip to content

Commit

Permalink
Use flag when building secp sys
Browse files Browse the repository at this point in the history
We currently use the `cc::Build::flag_if_supported` function to pass in
`-Wno-unused-function` however when building for wasm the flag is
ignored.

Using plain old `flag` seems to work, found by trial and error, I did no
further investigation as to why it works and the other does not.

Resolves: rust-bitcoin#434
  • Loading branch information
tcharding committed Oct 31, 2023
1 parent dd6bf7c commit d476fc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secp256k1-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {
base_config.include("depend/secp256k1/")
.include("depend/secp256k1/include")
.include("depend/secp256k1/src")
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
.flag("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
.define("SECP256K1_API", Some(""))
.define("ENABLE_MODULE_ECDH", Some("1"))
.define("ENABLE_MODULE_SCHNORRSIG", Some("1"))
Expand Down

0 comments on commit d476fc9

Please sign in to comment.