[PATCH] D15225: [Driver] Sanitizer support based on runtime library presence

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 13:47:54 PDT 2018


rnk added a subscriber: beanz.
rnk added a comment.

In https://reviews.llvm.org/D15225#1191304, @george.karpenkov wrote:

> @rnk As discussed, would it be acceptable for you to just have empty sanitizer runtime files in the resource directory?


I was talking to @beanz, and he suggested adding a cmake flag, something like CLANG_UNSUPPORTED_SANITIZERS=asan;ubsan;tsan;msan etc to control this. Alternatively, it could be a positive list of supported sanitizers, whatever is preferable.

I think my main objection to this is that while it's convenient from a packaging perspective, it ascribes too much significance to the existence or non-existence of some library files that aren't needed during compilation in the first place.

Changing the wording from "not supported" to "not available" doesn't seem that helpful. It would still lead someone down the path of needing to read the clang source code to understand that some library files are missing, whereas a link error would be more obvious.

It's also easy to imagine scenarios where the user has a slightly non-standard link setup and the runtime library ultimately doesn't come from the resource directory. For example, users checking out compiler-rt and building these libraries themselves, perhaps with additional instrumentation.

Overall, I feel like this is too tight coupling.


Repository:
  rL LLVM

https://reviews.llvm.org/D15225





More information about the cfe-commits mailing list