Skip to content

Commit d132eec

Browse files
committed
secp256k1: enable ellswift module
When running `cargo tarpaulin` (for test coverage) in a project that depends on this crate, compilation fails with: ``` = note: /usr/bin/ld: /rust-bitcoinconsensus/target/debug/build/bitcoinconsensus-6e1dd1af27ef0a27/out/libbitcoinconsensus.a(0ad13e9c6ad06456-pubkey.o): in function `EllSwiftPubKey::Decode() const': /rust-bitcoinconsensus/depend/bitcoin/src/pubkey.cpp:355: undefined reference to `secp256k1_ellswift_decode' collect2: error: ld returned 1 exit status ``` I am not sure why it's not a problem when compiling using `cargo test`, but the code does reference this function, so the module should be enabled.
1 parent ca6b531 commit d132eec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ fn main() {
4242
.define("ECMULT_GEN_PREC_BITS", "4")
4343
.define("ENABLE_MODULE_SCHNORRSIG", "1")
4444
.define("ENABLE_MODULE_EXTRAKEYS", "1")
45-
// Technically libconsensus doesn't require the recovery feautre, but `pubkey.cpp` does.
45+
// Technically libconsensus doesn't require the ellswift and recovery features, but
46+
// `pubkey.cpp` does.
47+
.define("ENABLE_MODULE_ELLSWIFT", "1")
4648
.define("ENABLE_MODULE_RECOVERY", "1")
4749
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult_gen.c")
4850
.file("depend/bitcoin/src/secp256k1/src/precomputed_ecmult.c")

0 commit comments

Comments
 (0)