Skip to content

Commit

Permalink
Reduce visibility on secp-sys symbols
Browse files Browse the repository at this point in the history
cc-rs builds C dependencies with reduced visibility to avoid
exporting the C symbols all the way out to any rust-built shared
libraries however we override it with SECP256K1_API. We should
avoid doing this, allowing LTO/DCE to do its work.
  • Loading branch information
TheBlueMatt committed Mar 18, 2021
1 parent 4ae0e7e commit 0a3c776
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions secp256k1-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ fn main() {
.include("depend/secp256k1/src")
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
.define("SECP256K1_BUILD", Some("1"))
.define("SECP256K1_API", Some(""))
.define("ENABLE_MODULE_ECDH", Some("1"))
.define("ENABLE_MODULE_SCHNORRSIG", Some("1"))
.define("ENABLE_MODULE_EXTRAKEYS", Some("1"))
Expand Down

0 comments on commit 0a3c776

Please sign in to comment.