[libcxx-commits] [PATCH] D122941: [libc++] Make the Debug mode a configuration-time only option

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 3 08:20:18 PDT 2022

ldionne marked an inline comment as done.
ldionne added a comment.

In D122941#3425149 <https://reviews.llvm.org/D122941#3425149>, @danlark wrote:

>> @danlark 
>> This patch will break users of the randomized unspecified behavior you added since you are most likely not shipping a debug-mode version of the library today. Has it been in used internally at Google?
> Thanks for adding me.
> I confirm we haven't shipped anything with randomization to the (external) users and this patch should be fine with us as we build everything from source

Just to make sure we're on the same page, here's what this change entails if you've been using randomization (even just internally): Out-of-the-box, you'll get a compiler error saying that you're using unspecified behavior randomization with a library that has been built without the debug mode. You'll need to switch to building the library with the debug mode enabled, i.e. `LIBCXX_ENABLE_DEBUG_MODE=ON` when configuring in CMake. However, that will also cause all the other debug mode checks to be enabled, which you may or may not want. And there will certainly be a slowdown associated to this, too. Is that fine, or do we need to make it possible to use unspecified behavior randomization without using the rest of the debug mode from the get-go? If that's a requirement for you, I'll try to think about ways to make that possible in this version of the patch and keep you up-to-date. If not, that makes my life easier since I can land this and then relax requirements once we've agreed on a design document (aiming to make it happen this week).

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list