[PATCH] Always add -lc++abi when using vptr sanitizer on Darwin.

Alexey Samsonov vonosmas at gmail.com
Tue Jan 13 17:55:02 PST 2015


================
Comment at: lib/Driver/ToolChains.cpp:385
@@ -383,1 +384,3 @@
+      if (Sanitize.sanitizesVptr())
+        CmdArgs.push_back("-lc++abi");
     }
----------------
samsonov wrote:
> kledzik wrote:
> > Nothing should be linking directly with libc++abi.dylib.  C++ code should link with libc++.dylib or libstdc++.dylib.  I think there is some other setting in the clang driver that controls which to link with.  But just linking with -lc++ will be right most of the time.
> What if chooses to provide -lstdc++? In that case we still need to get RTTI for `__cxxabiv1::__class_type_info` from somewhere...
> (see http://llvm.org/bugs/show_bug.cgi?id=21424).
What if *user* chooses

http://reviews.llvm.org/D6960

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list