Skip to content
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

Add -D_LIBCPP_ENABLE_HARDENED_MODE=1 #284

Open
david-a-wheeler opened this issue Nov 8, 2023 · 2 comments
Open

Add -D_LIBCPP_ENABLE_HARDENED_MODE=1 #284

david-a-wheeler opened this issue Nov 8, 2023 · 2 comments

Comments

@david-a-wheeler
Copy link
Contributor

We should probably add -D_LIBCPP_ENABLE_HARDENED_MODE=1. It helps for C++ when using libc++ and the LLVM compiler. See: https://libcxx.llvm.org/Hardening.html#using-hardening-modes

@thesamesam
Copy link
Contributor

thesamesam commented Nov 12, 2023

This bug is essentially a dupe of #149. LLVM keeps changing the option name. Please see #149 (comment) in particular.

@thomasnyman
Copy link
Contributor

Thanks @thesamesam for keeping us updated on this. We jumped the gun a bit with the deprecation notes for the older macros as we were basing this on the proposed changes to LLVM 17. Given that these and the older alternatives have been unstable in the past, I would suggest we wait with further additions to the guide until the new hardened mode becomes available in a LLVM release, hopefully with LLVM 18.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants