Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SECP256K1_BUILD #89

Merged
merged 1 commit into from
Feb 4, 2024
Merged

Remove SECP256K1_BUILD #89

merged 1 commit into from
Feb 4, 2024

Conversation

tcharding
Copy link
Member

Setting this variable causes a build warning, removing it doesn't seem to break anything and removes the warning. Also we do not set this variable when building secp256k1-sys over in the secp crate.

I have no idea what the variable was intended to do though.

Setting this variable causes a build warning, removing it doesn't seem
to break anything and removes the warning. Also we do not set this
variable when building `secp256k1-sys` over in the secp crate.

I have no idea what the variable was intended to do though.
@apoelstra
Copy link
Member

Like with SECP256K1_API, this is used to guard the include file to make sure you're not trying to build some sketchy half-build version of libsecp while exposing its normal API. We could drop it here without harm since we don't use the include files, though I'm a little sketched out because this informally is the "production build" flag for upstream.

What warning does it cause?

@tcharding
Copy link
Member Author

warning: depend/bitcoin/src/secp256k1/src/secp256k1.c:7: warning: "SECP256K1_BUILD" redefined
warning:     7 | #define SECP256K1_BUILD
warning:       |
warning: <command-line>: note: this is the location of the previous definition

@tcharding
Copy link
Member Author

we don't use the include files

Which include files did you mean? I had to add a couple of include statements in #87 to get cargo test to work.

@apoelstra
Copy link
Member

Oh, lol, we should definitely not be defining this manually since it's defined in secp256k1.c. This originates in #13 and it looks like nobody commented on it.

The include file I mean is secp256k1.h.

@apoelstra
Copy link
Member

A bunch of the defines here look outdated. See rust-bitcoin/rust-secp256k1#536

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ff73635

@apoelstra apoelstra merged commit d44e624 into master Feb 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants