-
Notifications
You must be signed in to change notification settings - Fork 1.1k
build: Refactor visibility logic and add override #1696
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: Refactor visibility logic and add override #1696
Conversation
fb5a833
to
ad46425
Compare
Yes, we can. |
ad46425
to
82b7412
Compare
LGTM. A few thoughts:
Those two would add up to: option(SECP256K1_ENABLE_VISIBILITY_ATTRIBUTES "Enable visibility attributes when compiling the library" ON)
if (NOT DEFINED CMAKE_C_VISIBILITY_PRESET)
set(CMAKE_C_VISIBILITY_PRESET hidden)
endif()
...
if(NOT SECP256K1_ENABLE_FUNCTION_VISIBILITY_ATTRIBUTES)
target_compile_definitions(secp256k1 PRIVATE SECP256K1_NO_FUNCTON_VISIBILITY_ATTRIBUTES)
endif() But I noticed while testing combinations of the above that it leads to broken outcomes for test binaries when simply disabling the To be robust against that, we'd need something like: option(SECP256K1_ENABLE_VISIBILITY_ATTRIBUTES "Enable visibility attributes when compiling the library" ON)
if (SECP256K1_ENABLE_FUNCTION_VISIBILITY_ATTRIBUTES AND NOT DEFINED CMAKE_C_VISIBILITY_PRESET)
set(CMAKE_C_VISIBILITY_PRESET hidden)
endif() Which of course would defeat the purpose. So I propose that we just skip trying to set tl;dr: I think this is the best solution so far, but propose adding a helper option to make life easier for parent projects: theuni@e22ed8c Core would then set |
True, but we also apply it to variables, e.g., Perhaps |
(edit: nevermind, got it now) |
Right, that's the just same problem as with your #1674.
Sounds good to me. |
I don't get why additional
(Both cmake and libtool set a define symbol when building a shared library. This symbol alone is insufficient to distinguish between three different cases. When using custom defines, the symbols set by those tools is redundant. The approach of using |
I've spent some time re-reading all the other competing PRs, including #1674, #1677, #1695), and discussing the topic offline with @purpleKarrot. Concept ACK on this one.
+1. |
I am failing to reason about all the different paths through that
I am a bit concerned that new libraries might follow the example set here. There should be a big disclaimer that points people to that GCC wiki page. |
include/secp256k1.h
Outdated
/* Consuming libsecp256k1 as a DLL. */ | ||
# define SECP256K1_API extern __declspec (dllimport) | ||
# endif | ||
#if !defined(SECP256K1_API) && defined(SECP256K1_NO_VISIBILITY_ATTRIBUTES) |
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.
My apologies if this was discussed earlier and I missed it, but it seems that SECP256K1_NO_VISIBILITY_ATTRIBUTES
should only be considered only when building the library, not when consuming it:
#if !defined(SECP256K1_API) && defined(SECP256K1_NO_VISIBILITY_ATTRIBUTES) | |
#if !defined(SECP256K1_API) && defined(SECP256K1_BUILD) && defined(SECP256K1_NO_VISIBILITY_ATTRIBUTES) |
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.
I don't think that it hurts to apply it when consuming the library. Or does it have any undesirable effects?
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.
I don't think that it hurts to apply it when consuming the library. Or does it have any undesirable effects?
None of those. I only found it easier to read the code.
This changes the meaning of Why avoid the need to set
I doubt that's true. As explained by @theuni in #1674, there's no such macro. There's just
Sure, writing it from scratch would lead to simpler code but my point is that the aforementioned arguments are stronger. |
82b7412
to
203376c
Compare
Renamed to
Cherry-pick (and renamed the option accordingly). It would be nice to get reviews by the end of the week, then we may get this into 0.7.0. |
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.
Looks good to me.
I'm really not too concerned about the implementation as long as we have the escape hatch. Thanks for adding the CMake option, that should make Core's integration nice and clean.
203376c
to
ef008ce
Compare
It is. By default, CMake defines Lines 73 to 75 in cbbbf3b
|
Which change exactly are you referring to? |
ef008ce
to
715d4eb
Compare
I'm not entirely sure what your question is, but the name should now both contain |
Indeed, but my claim is that there is no thing for libtool or autotools. The only define that libtool sets is |
715d4eb
to
8a112f8
Compare
Co-authored-by: Tim Ruffing <me@real-or-random.org>
8a112f8
to
c82d84b
Compare
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 c82d84b, I have reviewed the code and it looks OK.
Tested on Ubuntu 25.04 with Bitcoin Core in the "monokernel" integration scenario with additional set(CMAKE_C_VISIBILITY_PRESET hidden)
and set(SECP256K1_ENABLE_API_VISIBILITY_ATTRIBUTES OFF CACHE BOOL "" FORCE)
.
UPD. Additionally, the same scenario has been successfully tested on macOS Sequoia 15.5.
b9313c6e1a Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0 a660a4976e Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0 7ab8b0cc01 release cleanup: bump version after 0.7.0 a3e742d947 release: Prepare for 0.7.0 f67b0ac1a0 ci: Don't hardcode ABI version 020ee60495 Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair cde4130898 musig/tests: initialize keypair 6037833c9e Merge bitcoin-core/secp256k1#1702: changelog: update 40b4a06520 changelog: update 5e74086dc8 Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code 7c3380423c Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override 8d967a602b musig/test: Remove dead code 983711cd6d musig/tests: Refactor vectors_signverify 73a695958a Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` c82d84bb86 build: add CMake option for disabling symbol visibility attributes ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES e5297f6d79 build: Refactor visibility logic cbbbf3bd6e Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job 943479a7a3 Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install" 3352f9d667 ci: enable musig module for native macOS arm64 job ad60ef7ea7 Merge bitcoin-core/secp256k1#1689: ci: Convert `arm64` Cirrus tasks to GHA jobs c498779096 Merge bitcoin-core/secp256k1#1687: cmake: support the use of launchers in ctest -S scripts 44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" 0dfe387dbe cmake: support the use of launchers in ctest -S scripts 89096c234d Merge bitcoin-core/secp256k1#1692: cmake: configure libsecp256k1.pc during install 7106dce6fd cmake: configure libsecp256k1.pc during install 29e73f4ba5 Merge bitcoin-core/secp256k1#1685: cmake: Emulate Libtool's behavior on FreeBSD 746e36b141 Merge bitcoin-core/secp256k1#1678: cmake: add a helper for linking into static libs a28c2ffa5c Merge bitcoin-core/secp256k1#1683: README: add link to musig example 2a9d374735 Merge bitcoin-core/secp256k1#1690: ci: Bump GCC snapshot major version to 16 add146e101 ci: Bump GCC snapshot major version to 16 004f57fcd8 ci: Move Valgrind build for `arm64` from Cirrus to GHA 5fafdfc30f ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA e814b79a8b ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image bcf77346b9 ci: Add `arm64` architecture to `docker_cache` job b77aae9226 ci: Rename Docker image tag to reflect architecture 145ae3e28d cmake: add a helper for linking into static libs 819210974b README: add link to musig example, generalize module enabling hint 95db29b144 Merge bitcoin-core/secp256k1#1679: cmake: Use `PUBLIC_HEADER` target property in installation logic 37dd422b5c cmake: Emulate Libtool's behavior on FreeBSD f24b838bed Merge bitcoin-core/secp256k1#1680: doc: Promote "Building with CMake" to standard procedure 3f31ac43e0 doc: Promote "Building with CMake" to standard procedure 6f67151ee2 cmake: Use `PUBLIC_HEADER` target property c32715b2a0 cmake, move-only: Move module option processing to `src/CMakeLists.txt` 201b2b8f06 Merge bitcoin-core/secp256k1#1675: cmake: Bump minimum required CMake version to 3.22 3af71987a8 cmake: Bump minimum required CMake version to 3.22 92394476e9 Merge bitcoin-core/secp256k1#1673: Assert field magnitude at control-flow join 3a4f448cb4 Assert field magnitude at control-flow join 9fab425256 Merge bitcoin-core/secp256k1#1668: bench_ecmult: add benchmark for ecmult_const_xonly 05445377f4 bench_ecmult: add benchmark for ecmult_const_xonly bb597b3d39 Merge bitcoin-core/secp256k1#1670: tests: update wycheproof files d73ed99479 tests: update wycheproof files git-subtree-dir: src/secp256k1 git-subtree-split: b9313c6e1a6082a66b4c75777e18ca4b176fcf9d
b8b396c536 poc: use bindgen friendly api args e35bedeca6 docs: update README 92bfe6ecfe ci: enable silentpayments module 0360ec6d69 tests: add constant time tests 6f2ee94073 tests: add BIP-352 test vectors 5395317d5e silentpayments: add benchmarks for scanning 4a4db17ef0 silentpayments: add examples/silentpayments.c ccffc62eef silentpayments: receiving bcca09bb5a silentpayments: recipient label support 896e0af2f8 silentpayments: sending 7cedb6cd5d build: add skeleton for new silentpayments (BIP352) module b9313c6e1a Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0 a660a4976e Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0 7ab8b0cc01 release cleanup: bump version after 0.7.0 a3e742d947 release: Prepare for 0.7.0 f67b0ac1a0 ci: Don't hardcode ABI version 020ee60495 Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair cde4130898 musig/tests: initialize keypair 6037833c9e Merge bitcoin-core/secp256k1#1702: changelog: update 40b4a06520 changelog: update 5e74086dc8 Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code 7c3380423c Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override 8d967a602b musig/test: Remove dead code 983711cd6d musig/tests: Refactor vectors_signverify 73a695958a Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` c82d84bb86 build: add CMake option for disabling symbol visibility attributes ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES e5297f6d79 build: Refactor visibility logic cbbbf3bd6e Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job 943479a7a3 Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install" 3352f9d667 ci: enable musig module for native macOS arm64 job ad60ef7ea7 Merge bitcoin-core/secp256k1#1689: ci: Convert `arm64` Cirrus tasks to GHA jobs c498779096 Merge bitcoin-core/secp256k1#1687: cmake: support the use of launchers in ctest -S scripts 44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" 0dfe387dbe cmake: support the use of launchers in ctest -S scripts 89096c234d Merge bitcoin-core/secp256k1#1692: cmake: configure libsecp256k1.pc during install 7106dce6fd cmake: configure libsecp256k1.pc during install 29e73f4ba5 Merge bitcoin-core/secp256k1#1685: cmake: Emulate Libtool's behavior on FreeBSD 746e36b141 Merge bitcoin-core/secp256k1#1678: cmake: add a helper for linking into static libs a28c2ffa5c Merge bitcoin-core/secp256k1#1683: README: add link to musig example 2a9d374735 Merge bitcoin-core/secp256k1#1690: ci: Bump GCC snapshot major version to 16 add146e101 ci: Bump GCC snapshot major version to 16 004f57fcd8 ci: Move Valgrind build for `arm64` from Cirrus to GHA 5fafdfc30f ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA e814b79a8b ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image bcf77346b9 ci: Add `arm64` architecture to `docker_cache` job b77aae9226 ci: Rename Docker image tag to reflect architecture 145ae3e28d cmake: add a helper for linking into static libs 819210974b README: add link to musig example, generalize module enabling hint 95db29b144 Merge bitcoin-core/secp256k1#1679: cmake: Use `PUBLIC_HEADER` target property in installation logic 37dd422b5c cmake: Emulate Libtool's behavior on FreeBSD f24b838bed Merge bitcoin-core/secp256k1#1680: doc: Promote "Building with CMake" to standard procedure 3f31ac43e0 doc: Promote "Building with CMake" to standard procedure 6f67151ee2 cmake: Use `PUBLIC_HEADER` target property c32715b2a0 cmake, move-only: Move module option processing to `src/CMakeLists.txt` 201b2b8f06 Merge bitcoin-core/secp256k1#1675: cmake: Bump minimum required CMake version to 3.22 3af71987a8 cmake: Bump minimum required CMake version to 3.22 92394476e9 Merge bitcoin-core/secp256k1#1673: Assert field magnitude at control-flow join 3a4f448cb4 Assert field magnitude at control-flow join 9fab425256 Merge bitcoin-core/secp256k1#1668: bench_ecmult: add benchmark for ecmult_const_xonly 05445377f4 bench_ecmult: add benchmark for ecmult_const_xonly bb597b3d39 Merge bitcoin-core/secp256k1#1670: tests: update wycheproof files d73ed99479 tests: update wycheproof files git-subtree-dir: src/secp256k1 git-subtree-split: b8b396c536c05bdebf1bd8fbfc15a4a051f074b7
410abb205a batch: Generate speedup graphs e5df505bad batch, extrakeys: Add benchmarks 642901f57a batch: Add tests for batch_add_* APIs 6378b6bcdc batch,ecmult: Add tests for core batch APIs and strauss_batch refactor e5bbca63bf batch: Add example f818fc0e4b batch: Add batch_add_* APIs b47d8f3877 batch, ecmult: Add batch_verify and refactor strauss_batch 535a94b6d2 batch: Add create and destroy APIs 800233a2d4 batch: Initialize an experimental batch module REVERT: b9313c6e1a Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0 REVERT: a660a4976e Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0 REVERT: 7ab8b0cc01 release cleanup: bump version after 0.7.0 REVERT: a3e742d947 release: Prepare for 0.7.0 REVERT: f67b0ac1a0 ci: Don't hardcode ABI version REVERT: 020ee60495 Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair REVERT: cde4130898 musig/tests: initialize keypair REVERT: 6037833c9e Merge bitcoin-core/secp256k1#1702: changelog: update REVERT: 40b4a06520 changelog: update REVERT: 5e74086dc8 Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code REVERT: 7c3380423c Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override REVERT: 8d967a602b musig/test: Remove dead code REVERT: 983711cd6d musig/tests: Refactor vectors_signverify REVERT: 73a695958a Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` REVERT: bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` REVERT: c82d84bb86 build: add CMake option for disabling symbol visibility attributes REVERT: ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES REVERT: e5297f6d79 build: Refactor visibility logic REVERT: cbbbf3bd6e Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job REVERT: 943479a7a3 Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install" REVERT: 3352f9d667 ci: enable musig module for native macOS arm64 job REVERT: ad60ef7ea7 Merge bitcoin-core/secp256k1#1689: ci: Convert `arm64` Cirrus tasks to GHA jobs REVERT: c498779096 Merge bitcoin-core/secp256k1#1687: cmake: support the use of launchers in ctest -S scripts REVERT: 44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" REVERT: 0dfe387dbe cmake: support the use of launchers in ctest -S scripts REVERT: 89096c234d Merge bitcoin-core/secp256k1#1692: cmake: configure libsecp256k1.pc during install REVERT: 7106dce6fd cmake: configure libsecp256k1.pc during install REVERT: 004f57fcd8 ci: Move Valgrind build for `arm64` from Cirrus to GHA REVERT: 5fafdfc30f ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA REVERT: e814b79a8b ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image REVERT: bcf77346b9 ci: Add `arm64` architecture to `docker_cache` job REVERT: b77aae9226 ci: Rename Docker image tag to reflect architecture git-subtree-dir: src/secp256k1 git-subtree-split: 410abb205a93b5c84a00a4e9e478c852b6dc6d69
b9313c6e1a Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0 a660a4976e Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0 7ab8b0cc01 release cleanup: bump version after 0.7.0 a3e742d947 release: Prepare for 0.7.0 f67b0ac1a0 ci: Don't hardcode ABI version 020ee60495 Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair cde4130898 musig/tests: initialize keypair 6037833c9e Merge bitcoin-core/secp256k1#1702: changelog: update 40b4a06520 changelog: update 5e74086dc8 Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code 7c3380423c Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override 8d967a602b musig/test: Remove dead code 983711cd6d musig/tests: Refactor vectors_signverify 73a695958a Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` c82d84bb86 build: add CMake option for disabling symbol visibility attributes ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES e5297f6d79 build: Refactor visibility logic cbbbf3bd6e Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job 943479a7a3 Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install" 3352f9d667 ci: enable musig module for native macOS arm64 job ad60ef7ea7 Merge bitcoin-core/secp256k1#1689: ci: Convert `arm64` Cirrus tasks to GHA jobs c498779096 Merge bitcoin-core/secp256k1#1687: cmake: support the use of launchers in ctest -S scripts 44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" 0dfe387dbe cmake: support the use of launchers in ctest -S scripts 89096c234d Merge bitcoin-core/secp256k1#1692: cmake: configure libsecp256k1.pc during install 7106dce6fd cmake: configure libsecp256k1.pc during install 29e73f4ba5 Merge bitcoin-core/secp256k1#1685: cmake: Emulate Libtool's behavior on FreeBSD 746e36b141 Merge bitcoin-core/secp256k1#1678: cmake: add a helper for linking into static libs a28c2ffa5c Merge bitcoin-core/secp256k1#1683: README: add link to musig example 2a9d374735 Merge bitcoin-core/secp256k1#1690: ci: Bump GCC snapshot major version to 16 add146e101 ci: Bump GCC snapshot major version to 16 004f57fcd8 ci: Move Valgrind build for `arm64` from Cirrus to GHA 5fafdfc30f ci: Move `gcc-snapshot` build for `arm64` from Cirrus to GHA e814b79a8b ci: Switch `arm64_debian` from QEMU to native `arm64` Docker image bcf77346b9 ci: Add `arm64` architecture to `docker_cache` job b77aae9226 ci: Rename Docker image tag to reflect architecture 145ae3e28d cmake: add a helper for linking into static libs 819210974b README: add link to musig example, generalize module enabling hint 95db29b144 Merge bitcoin-core/secp256k1#1679: cmake: Use `PUBLIC_HEADER` target property in installation logic 37dd422b5c cmake: Emulate Libtool's behavior on FreeBSD f24b838bed Merge bitcoin-core/secp256k1#1680: doc: Promote "Building with CMake" to standard procedure 3f31ac43e0 doc: Promote "Building with CMake" to standard procedure 6f67151ee2 cmake: Use `PUBLIC_HEADER` target property c32715b2a0 cmake, move-only: Move module option processing to `src/CMakeLists.txt` 201b2b8f06 Merge bitcoin-core/secp256k1#1675: cmake: Bump minimum required CMake version to 3.22 3af71987a8 cmake: Bump minimum required CMake version to 3.22 92394476e9 Merge bitcoin-core/secp256k1#1673: Assert field magnitude at control-flow join 3a4f448cb4 Assert field magnitude at control-flow join 9fab425256 Merge bitcoin-core/secp256k1#1668: bench_ecmult: add benchmark for ecmult_const_xonly 05445377f4 bench_ecmult: add benchmark for ecmult_const_xonly bb597b3d39 Merge bitcoin-core/secp256k1#1670: tests: update wycheproof files d73ed99479 tests: update wycheproof files git-subtree-dir: src/secp256k1 git-subtree-split: b9313c6e1a6082a66b4c75777e18ca4b176fcf9d
9e85256bbe docs: update README 4b1fb2c186 ci: enable silentpayments module de508a78ac tests: add constant time tests 45427dd4d7 tests: add BIP-352 test vectors 6975614517 silentpayments: add benchmarks for scanning a9af9ebf35 silentpayments: add examples/silentpayments.c b06254b6c7 silentpayments: receiving 3c9362dd6a silentpayments: recipient label support 70e20b7145 silentpayments: sending cf44324b5e build: add skeleton for new silentpayments (BIP352) module REVERT: b9313c6e1a Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0 REVERT: a660a4976e Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0 REVERT: 7ab8b0cc01 release cleanup: bump version after 0.7.0 REVERT: a3e742d947 release: Prepare for 0.7.0 REVERT: f67b0ac1a0 ci: Don't hardcode ABI version REVERT: 020ee60495 Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair REVERT: cde4130898 musig/tests: initialize keypair REVERT: 6037833c9e Merge bitcoin-core/secp256k1#1702: changelog: update REVERT: 40b4a06520 changelog: update REVERT: 5e74086dc8 Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code REVERT: 7c3380423c Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override REVERT: 8d967a602b musig/test: Remove dead code REVERT: 983711cd6d musig/tests: Refactor vectors_signverify REVERT: 73a695958a Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` REVERT: bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` REVERT: c82d84bb86 build: add CMake option for disabling symbol visibility attributes REVERT: ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES REVERT: e5297f6d79 build: Refactor visibility logic REVERT: cbbbf3bd6e Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job REVERT: 943479a7a3 Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install" REVERT: 3352f9d667 ci: enable musig module for native macOS arm64 job REVERT: 44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" git-subtree-dir: src/secp256k1 git-subtree-split: 9e85256bbe527bf084222ee08dade9ea497d5c99
9e85256bbe docs: update README 4b1fb2c186 ci: enable silentpayments module de508a78ac tests: add constant time tests 45427dd4d7 tests: add BIP-352 test vectors 6975614517 silentpayments: add benchmarks for scanning a9af9ebf35 silentpayments: add examples/silentpayments.c b06254b6c7 silentpayments: receiving 3c9362dd6a silentpayments: recipient label support 70e20b7145 silentpayments: sending cf44324b5e build: add skeleton for new silentpayments (BIP352) module REVERT: b9313c6e1a Merge bitcoin-core/secp256k1#1708: release cleanup: bump version after 0.7.0 REVERT: a660a4976e Merge bitcoin-core/secp256k1#1707: release: Prepare for 0.7.0 REVERT: 7ab8b0cc01 release cleanup: bump version after 0.7.0 REVERT: a3e742d947 release: Prepare for 0.7.0 REVERT: f67b0ac1a0 ci: Don't hardcode ABI version REVERT: 020ee60495 Merge bitcoin-core/secp256k1#1706: musig/tests: initialize keypair REVERT: cde4130898 musig/tests: initialize keypair REVERT: 6037833c9e Merge bitcoin-core/secp256k1#1702: changelog: update REVERT: 40b4a06520 changelog: update REVERT: 5e74086dc8 Merge bitcoin-core/secp256k1#1705: musig/test: Remove dead code REVERT: 7c3380423c Merge bitcoin-core/secp256k1#1696: build: Refactor visibility logic and add override REVERT: 8d967a602b musig/test: Remove dead code REVERT: 983711cd6d musig/tests: Refactor vectors_signverify REVERT: 73a695958a Merge bitcoin-core/secp256k1#1704: cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` REVERT: bf082221ff cmake: Make `secp256k1_objs` inherit interface defines from `secp256k1` REVERT: c82d84bb86 build: add CMake option for disabling symbol visibility attributes REVERT: ce7923874f build: Add SECP256K1_NO_API_VISIBILITY_ATTRIBUTES REVERT: e5297f6d79 build: Refactor visibility logic REVERT: cbbbf3bd6e Merge bitcoin-core/secp256k1#1699: ci: enable musig module for native macOS arm64 job REVERT: 943479a7a3 Merge bitcoin-core/secp256k1#1694: Revert "cmake: configure libsecp256k1.pc during install" REVERT: 3352f9d667 ci: enable musig module for native macOS arm64 job REVERT: 44b205e9ee Revert "cmake: configure libsecp256k1.pc during install" git-subtree-dir: src/secp256k1 git-subtree-split: 9e85256bbe527bf084222ee08dade9ea497d5c99
This is less invasive than #1695. The latter might be the right thing in a new library (and then we'd probably not support autotools in the first place), but any semantic change to this code has the potential to create news bug, or at least breakages for downstream users.
This is different from #1677 in that it does not set
hidden
explicitly. I agree with the comment in #1677 that settinghidden
violates the principle of least surprise.So this similar in spirit to #1674. So I wonder if this should also include
3eef736. I'd say no,
fvisibility
should then set by the user. But can you, in CMake, setCMAKE_C_VISIBILITY_PRESET
from a parent project?