Skip to content

Commit ee1103a

Browse files
committed
Reduce visibility on secp-sys symbols
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.
1 parent 63f4de7 commit ee1103a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

secp256k1-sys/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ fn main() {
3333
.include("depend/secp256k1/src")
3434
.flag_if_supported("-Wno-unused-function") // some ecmult stuff is defined but not used upstream
3535
.define("SECP256K1_BUILD", Some("1"))
36+
.define("SECP256K1_API", Some(""))
3637
.define("ENABLE_MODULE_ECDH", Some("1"))
3738
.define("ENABLE_MODULE_SCHNORRSIG", Some("1"))
3839
.define("ENABLE_MODULE_EXTRAKEYS", Some("1"))

0 commit comments

Comments
 (0)