Skip to content

Commit 8a32f8e

Browse files
committed
build: Add --enable-helgrind option
1 parent a04127d commit 8a32f8e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ else
274274
fi
275275

276276
opt sharedstd 1 "build libstd as a shared library"
277-
opt valgrind 1 "run tests with valgrind"
277+
opt valgrind 1 "run tests with valgrind (memcheck by default)"
278+
opt helgrind 0 "run tests with helgrind instead of memcheck"
278279
opt docs 1 "build documentation"
279280
opt optimize 1 "build optimized rust code"
280281
opt optimize-cxx 1 "build optimized C++ code"

mk/platform.mk

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,16 @@ ifdef CFG_UNIXY
162162
endif
163163
endif
164164
ifdef CFG_VALGRIND
165-
CFG_VALGRIND += --leak-check=full \
166-
--error-exitcode=100 \
165+
CFG_VALGRIND += --error-exitcode=100 \
167166
--quiet \
168167
--suppressions=$(CFG_SRC_DIR)src/etc/x86.supp \
169168
$(OS_SUPP)
169+
ifdef CFG_ENABLE_HELGRIND
170+
CFG_VALGRIND += --tool=helgrind
171+
else
172+
CFG_VALGRIND += --tool=memcheck \
173+
--leak-check=full
174+
endif
170175
endif
171176
endif
172177

0 commit comments

Comments
 (0)