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

Kuba Brecka via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 7 11:20:53 PST 2015


kubabrecka added inline comments.

================
Comment at: test/Driver/fsanitize.c:221
@@ +220,3 @@
+// RUN: %clang -target x86_64-apple-darwin10 -resource-dir=%S/Inputs/resource_dir -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN-DARWIN1
+// CHECK-MSAN-TSAN-MSAN-DARWIN1: unsupported option '-fsanitize=thread,memory' for target 'x86_64-apple-darwin10'
+// CHECK-MSAN-TSAN-MSAN-DARWIN1-NOT: unsupported option
----------------
samsonov wrote:
> Again, I feel like we're lying to users here: `-fsanitize=thread` *is* supported for this target, it just requires building a runtime.
I'd like to see this from the point-of-view of a binary distribution.  If the binary distribution (e.g. the one from llvm.org or Apple's Clang in Xcode) doesn't contain a runtime library, then the sanitizer is *not* supported in that distribution.  Also, see http://reviews.llvm.org/D14846, we'd like to have CMake options to select which runtimes will be built.  If you deliberately choose not to build ThreadSanitizer, then that sanitizer is *not* supported in your version of Clang.  If you're experimenting and porting a runtime to a new platform, then this sanitizer *is* supported in your version of Clang.


http://reviews.llvm.org/D15225





More information about the cfe-commits mailing list