-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
bitcoin-core: Switch to "Debug" build configuration #12443
base: master
Are you sure you want to change the base?
Conversation
hebasto has previously contributed to projects/bitcoin-core. The previous PR was #12419 |
This is just a style fixup, not changing any behavior, right? |
Hmm. Not exactly: --- configure_before 2024-09-03 14:24:39.109943431 +0100
+++ configure_after 2024-09-03 14:36:16.687324185 +0100
@@ -31,9 +31,9 @@
Cross compiling ....................... FALSE
C++ compiler .......................... Clang 18.0.0, /usr/local/bin/clang++
-CMAKE_BUILD_TYPE ...................... RelWithDebInfo
-Preprocessor defined macros ........... ABORT_ON_FAILED_ASSUME _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG BOOST_MULTI_INDEX_ENABLE_SAFE_MODE
-C++ compiler flags .................... -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++20 -fPIC -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection
+CMAKE_BUILD_TYPE ...................... Debug
+Preprocessor defined macros ........... ABORT_ON_FAILED_ASSUME _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG BOOST_MULTI_INDEX_ENABLE_SAFE_MODE DEBUG DEBUG_LOCKORDER DEBUG_LOCKCONTENTION RPC_DOC_CHECK ABORT_ON_FAILED_ASSUME
+C++ compiler flags .................... -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++20 -fPIC -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection
Linker flags .......................... -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -fsanitize=fuzzer -fstack-protector-all -fcf-protection=full -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,separate-code -fPIE -pie
NOTE: The summary above may not exactly match the final applied build flags New preprocessor flags: |
I don't think we want such a change. |
Maybe mark as Draft for now? Otherwise it will get merged in this repo, as soon as CI passes. |
Could push and compare again now that bitcoin/bitcoin#30824 is merged. |
This change ensures consistent usage of the "Debug" build configuration when depends are built with `DEBUG=1`.
1e564fb
to
5c76fef
Compare
Done. Here is the diff: --- before 2024-09-09 14:09:36.536299760 +0100
+++ after 2024-09-09 14:10:29.821815704 +0100
@@ -1,8 +1,8 @@
Cross compiling ....................... FALSE
C++ compiler .......................... Clang 18.0.0, /usr/local/bin/clang++
-CMAKE_BUILD_TYPE ...................... RelWithDebInfo
-Preprocessor defined macros ........... ABORT_ON_FAILED_ASSUME _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG BOOST_MULTI_INDEX_ENABLE_SAFE_MODE
+CMAKE_BUILD_TYPE ...................... Debug
+Preprocessor defined macros ........... ABORT_ON_FAILED_ASSUME _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG BOOST_MULTI_INDEX_ENABLE_SAFE_MODE DEBUG DEBUG_LOCKORDER DEBUG_LOCKCONTENTION RPC_DOC_CHECK ABORT_ON_FAILED_ASSUME
C++ compiler flags .................... -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -std=c++20 -fPIC -Wall -Wextra -Wgnu -Wformat -Wformat-security -Wvla -Wshadow-field -Wthread-safety -Wloop-analysis -Wredundant-decls -Wunused-member-function -Wdate-time -Wconditional-uninitialized -Woverloaded-virtual -Wsuggest-override -Wimplicit-fallthrough -Wunreachable-code -Wdocumentation -Wself-assign -Wundef -Wno-unused-parameter -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -Wstack-protector -fstack-protector-all -fcf-protection=full -fstack-clash-protection
Linker flags .......................... -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -fsanitize=fuzzer -fstack-protector-all -fcf-protection=full -fstack-clash-protection -Wl,-z,relro -Wl,-z,now -Wl,-z,separate-code -fPIE -pie
|
Is this ready for review? Thanks : ) |
This PR ensures consistent usage of the "Debug" build configuration when depends are built with
DEBUG=1
.For more details, please refer to this discussion.