[PATCH] SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.

Alexander Potapenko glider at google.com
Thu Oct 24 06:15:47 PDT 2013



================
Comment at: lib/Driver/ToolChains.cpp:300
@@ -299,3 +299,3 @@
   if (Sanitize.needsUbsanRt()) {
     if (isTargetIPhoneOS()) {
       getDriver().Diag(diag::err_drv_clang_unsupported_per_platform)
----------------
Peter Collingbourne wrote:
> Alexey Samsonov wrote:
> > Can you move this piece to filterUnsupportedKinds?
> I think so.  The logic behind isTargetIPhoneOS() and isTargetIOSSimulator() is in Darwin::AddDeploymentTarget and is rather more complex than my translation (e.g. it checks certain flags).  This branch was untested though, so I'm inclined to change the logic and let Apple folks fix this if it causes a problem.
The reason behind the check for "isTargetIPhoneOS() && !isTargetIOSSimulator()" in ASan (added by me) was to prevent people from trying ASan on the real iOS devices where it doesn't work, but let them use ASan for iossim builds.
I'd love to keep this check, if possible.


http://llvm-reviews.chandlerc.com/D1990



More information about the cfe-commits mailing list