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 68c0e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secp256k1-sys/depend/secp256k1/include/secp256k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ typedef int (*rustsecp256k1_v0_4_0_nonce_function)(
# define SECP256K1_API
# endif
# elif defined(__GNUC__) && (__GNUC__ >= 4) && defined(SECP256K1_BUILD)
# define SECP256K1_API __attribute__ ((visibility ("default")))
# define SECP256K1_API
# else
# define SECP256K1_API
# endif
Expand Down

0 comments on commit 68c0e1e

Please sign in to comment.