What does `SECP256K1_API` do?
tcharding opened this issue · 1 comments
tcharding commented
Removing the define of this variable in build.rs
doesn't seem to do anything. What does this var do?
Context
// Actual build
let mut base_config = cc::Build::new();
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_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"))
apoelstra commented
I'm surprised that the code compiles without that define. It erases the SECP256K1_API
markers that appear in the libsecp header files, and which is used by the upstream build process to distinguish between exported and non-exported symbols.
I guess we could drop it since it only occurs in the header files, and we don't compile those..