-
Notifications
You must be signed in to change notification settings - Fork 1k
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
build: Use SECP256K1_STATICLIB
macro instead of warning suppressions
#1346
Conversation
This change allows the user to define the `SECP256K1_STATICLIB` macro instead of ignoring MSVC linker warnings LNK4217 and LNK4286.
Concept ACK The macro is cheap, and if it helps Core get a cleaner build, then we should just add it. Many hours of researching and experimenting went into that piece of code, so I'll probably follow up with a PR that adds extensive comments.
Do you mean the LNK4286 is also raised? I see that one in the logs. |
Yes. I put the wrong line into the PR description. Updated. |
@sipsorcery Friendly ping :) As a Windows connoisseur, what do you think? |
As a Windows user I'm used to just ignoring crap from the OS so I would have stopped at adding an option to ignore the warnings. This PR is a step further and makes it even cleaner so looks good to me. ACK 6177b8a. |
Closing in favor of #1362. |
…s (attempt 3) c6cd2b1 ci: Add task for static library on Windows + CMake (Hennadii Stepanov) 020bf69 build: Add extensive docs on visibility issues (Tim Ruffing) 0196e8a build: Introduce `SECP256k1_DLL_EXPORT` macro (Hennadii Stepanov) 9f1b190 refactor: Replace `SECP256K1_API_VAR` with `SECP256K1_API` (Hennadii Stepanov) ae9db95 build: Introduce `SECP256K1_STATIC` macro for Windows users (Hennadii Stepanov) Pull request description: Previous attempts: - #1346 - #1362 The result is as follows: 1. Simple, concise and extensively documented code. 2. Explicitly documented use cases with no ambiguities. 3. No workarounds for linker warnings. 4. Solves one item in #1235. ACKs for top commit: real-or-random: utACK c6cd2b1 Tree-SHA512: d58694452d630aefbd047916033249891bc726b7475433aaaa7c3ea2a07ded8f185a598385b67c2ee3440ec5904ff9d9452c97b0961d84dcb2eb2cf46caa171e
The changes from #1209 has been described as:
Apparently, this description is not complete. When building Bitcoin Core, the other warning is raised as well:
This PR provides to the user of a static libsecp256k1 library an option to define the
SECP256K1_STATICLIB
macro instead of ignoring MSVC linker warnings LNK4217 and LNK4286.