On the master branch @ 70e20ea024ce4f39abc4022e1ba19d5a6db2a207, the APPEND_CPPFLAGS, APPEND_CFLAGS and APPEND_LDFLAGS are not correctly applied when building C code in the secp256k1 subtree, as intended.
This behaviour occurs due to two issues:
-
The command here: https://github.com/bitcoin/bitcoin/blob/70e20ea024ce4f39abc4022e1ba19d5a6db2a207/src/CMakeLists.txt#L77 does not affect the code in
add_subdirectory(secp256k1)above it. -
APPEND_LDFLAGSis not passed to the subtree’s build system at all.
This PR fixes both issues.
Additionally, the helper variables core_sanitizer_cxx_flags and core_sanitizer_linker_flags have been removed.