]> git.lizzy.rs Git - rust.git/commitdiff
build: Add --enable-helgrind option
authorBrian Anderson <banderson@mozilla.com>
Fri, 2 Mar 2012 22:07:43 +0000 (14:07 -0800)
committerBrian Anderson <banderson@mozilla.com>
Fri, 2 Mar 2012 22:08:02 +0000 (14:08 -0800)
configure
mk/platform.mk

index f642752f9cedfa0a9fa600154ae980ffdaa1546d..8b61e34db226e568b848ebcf7e7e1d721af24f89 100755 (executable)
--- a/configure
+++ b/configure
@@ -274,7 +274,8 @@ else
 fi
 
 opt sharedstd 1 "build libstd as a shared library"
-opt valgrind 1 "run tests with valgrind"
+opt valgrind 1 "run tests with valgrind (memcheck by default)"
+opt helgrind 0 "run tests with helgrind instead of memcheck"
 opt docs     1 "build documentation"
 opt optimize 1 "build optimized rust code"
 opt optimize-cxx 1 "build optimized C++ code"
index 2312ae9a76ea079d1eb3444da2eb85a7f9eae810..2afe8872a67ad00cfeaca80d8518c23f9956e8c7 100644 (file)
@@ -162,11 +162,16 @@ ifdef CFG_UNIXY
     endif
   endif
   ifdef CFG_VALGRIND
-    CFG_VALGRIND += --leak-check=full \
-                    --error-exitcode=100 \
+    CFG_VALGRIND += --error-exitcode=100 \
                     --quiet \
                     --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
                     $(OS_SUPP)
+    ifdef CFG_ENABLE_HELGRIND
+      CFG_VALGRIND += --tool=helgrind
+    else
+      CFG_VALGRIND += --tool=memcheck \
+                      --leak-check=full
+    endif
   endif
 endif