-
Notifications
You must be signed in to change notification settings - Fork 38.8k
build: use _LIBCPP_ENABLE_DEBUG_MODE over ENABLE_ASSERTIONS #28479
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
Conversation
`_LIBCPP_ENABLE_ASSERTIONS` is deprecated, and will be removed. [See (from libc++ __config in main)](https://github.com/llvm/llvm-project/blob/b57df9fe9a1a230f277d671bfa0884bbda9fc1c5/libcxx/include/__config#L205-L209): > TODO(hardening): remove this in LLVM 19. > This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes) > equivalent to setting the safe mode. > ifdef _LIBCPP_ENABLE_ASSERTIONS > warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_ENABLE_SAFE_MODE instead." From LLVM 17, `_LIBCPP_ENABLE_DEBUG_MODE` can be used instead. See https://libcxx.llvm.org/Hardening.html. Related to bitcoin#28476.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
Concept ACK. This should fix the warning: To reproduce on a fresh install of mantic: |
|
As a combined follow-up idea, #27495 could be re-opened and re-based? |
maflcko
left a comment
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.
lgtm ACK 4a82503 🙏
Show signature
Signature:
untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: lgtm ACK 4a825039a509c43ba20b2cd7aab448b3be16bcc3 🙏
qd5zY5wVVk1rUQRh+ogkg4hRqTNWyaizwMXgS0oZqgG21kesDV/Wyd4gOwysaH5/ossdSsnSQmb+Sy3hZmTNCw==
Sure. Reopened and rebased (on master and this and 28476). |
…_ASSERTIONS 4a82503 build: use _LIBCPP_ENABLE_DEBUG_MODE over ENABLE_ASSERTIONS (fanquake) Pull request description: `_LIBCPP_ENABLE_ASSERTIONS` is deprecated, and will be removed. [See (from libc++ __config in main)](https://github.com/llvm/llvm-project/blob/b57df9fe9a1a230f277d671bfa0884bbda9fc1c5/libcxx/include/__config#L205-L209): > TODO(hardening): remove this in LLVM 19. > This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes) > equivalent to setting the safe mode. > ifdef _LIBCPP_ENABLE_ASSERTIONS > warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_ENABLE_SAFE_MODE instead." From LLVM 17, `_LIBCPP_ENABLE_DEBUG_MODE` can be used instead, which also performs more checks than safe mode: > Enables the debug mode which contains all the checks from the hardened mode and additionally more expensive checks that may affect the complexity of algorithms. The debug mode is intended to be used for testing, not in production. Mutually exclusive with `_LIBCPP_ENABLE_HARDENED_MODE` and `_LIBCPP_ENABLE_SAFE_MODE`. See https://libcxx.llvm.org/Hardening.html. Related to bitcoin#28476. ACKs for top commit: MarcoFalke: lgtm ACK 4a82503 🙏 Tree-SHA512: ca52603f86214e8e9350bd2b2baa44fbde0f72f1b186da7aecd8690256dff5b2be75fe89383158298a6f683bbd6ae0dff528d2ba4cc5ece1f56cfbdee0e1dc5d
_LIBCPP_ENABLE_ASSERTIONSis deprecated, and will be removed. See (from libc++ __config in main):From LLVM 17,
_LIBCPP_ENABLE_DEBUG_MODEcan be used instead, which also performs more checks than safe mode:See https://libcxx.llvm.org/Hardening.html.
Related to #28476.