-
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: 45839th attempt to fix symbol visibility on Windows #1595
base: master
Are you sure you want to change the base?
build: 45839th attempt to fix symbol visibility on Windows #1595
Conversation
5eb211a
to
6077065
Compare
I can at least confirm that this "fixes" the output I was seeing in #1421. The most recent comment on the upstream GCC issue is not 100% clear to me. |
Can you elaborate on which part is unclear? In any case, I could rephrase this such that it says it's a GCC bug. When I wrote it, I wasn't sure yet, but the upstream response seems to confirm that this is a bug. |
I've re-read, and yes, it seems like the conclusion is that it is a GCC issue. I guess what is actually unclear is if/when anyone might fix it upstream. |
6077065
to
447334c
Compare
Okay. I've nevertheless rephrased the comment to make it (hopefully) clearer. |
ACK 447334c |
@hebasto Wanna review this? :) |
also cc @theuni |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 447334c, tested on Ubuntu 24.04 using the following commands:
$ env CFLAGS="-flto" cmake -B build --preset dev-mode --toolchain cmake/x86_64-w64-mingw32.toolchain.cmake
$ cmake --build build -j 16 -t tests noverify_tests
@@ -147,6 +147,15 @@ typedef int (*secp256k1_nonce_function)( | |||
* 1. If using Libtool, it defines DLL_EXPORT automatically. | |||
* 2. In other cases, SECP256K1_DLL_EXPORT must be defined. */ | |||
# define SECP256K1_API extern __declspec (dllexport) | |||
# else | |||
/* Building libsecp256k1 as a static library on Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Referencing the use of a static library does not apply to our cases with the tests
and noverify_tests
targets using CMake, where object files are linked directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 447334c
Fixes #1421. See code comments for rationale.
Related meta-bug: #1181. This reminds me that we should move forward with #1359.