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

Danila Kutenin via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 3 08:09:10 PDT 2022

danlark added a comment.

In D122941#3425128 <https://reviews.llvm.org/D122941#3425128>, @ldionne wrote:

> In D122941#3425095 <https://reviews.llvm.org/D122941#3425095>, @philnik wrote:
>> Another thought: Should we change the ABI namespace to force link time errors if someone tries to link against the wrong library? - This should probably be done in the same patch where we enable some ABI flags.
> We are very much on the same page, it seems :-). Quoting from my in-progress design document:
> - The sanitized version of the library would have a different name, for example `libc++-sanitized.dylib`. A different `__config_site` file would also be provided to be used when compiling code against the sanitized library. Vendors could ship both the sanitized and the non-sanitized library side-by-side.
> - The sanitized version of the library would use a different inline namespace to make sure that code can’t accidentally link against the wrong version of the library (which would result in runtime errors due to ABI incompatibilities).
> - When `-fsanitize=library` is passed to the compiler, the compiler would automatically switch to using the sanitized version of the library. It would use the sanitized shared library as well as the sanitized version of the `__config_site` header, so that code in the headers would be built with sanitization enabled too.
> I will also treat the topic of ABI compatibility between sanitized and non-sanitized versions, and also ABI stability between sanitized versions. Stay tuned, I should post it to Discourse in a couple of days.
> @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

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list