build: support asan and tsan toolchain shortcuts
authorLuca Barbato <lu_zero@gentoo.org>
Sun, 14 Oct 2012 05:54:22 +0000 (07:54 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Mon, 15 Oct 2012 16:25:35 +0000 (18:25 +0200)
configure

index 8652639..870b6ad 100755 (executable)
--- a/configure
+++ b/configure
@@ -2048,6 +2048,16 @@ ranlib="${cross_prefix}${ranlib}"
 sysinclude_default="${sysroot}/usr/include"
 
 case "$toolchain" in
+    clang-asan)
+        cc_default="clang"
+        add_cflags  -faddress-sanitizer
+        add_ldflags -faddress-sanitizer
+    ;;
+    clang-tsan)
+        cc_default="clang"
+        add_cflags  -fthread-sanitizer
+        add_ldflags -fthread-sanitizer
+    ;;
     msvc)
         cc_default="c99wrap cl"
         ld_default="c99wrap link"