Skip to content

Commit e1a52a5

Browse files
committed
Fix Valgrind CI run when building with Clang
Clang creates now DWARFv5 debug infos which isn't supported in old Valgrind versions. Instruct Clang to create DWARFv4 debug infos, so we can run our tests in Valgrind. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 87665fb commit e1a52a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.ci/valgrind.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ make clean &>/dev/null
2121

2222
echo "Build for valgrind..."
2323

24-
make -j$MAKE_JOBS CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" test LTC_DEBUG=1 1>gcc_1.txt 2>gcc_2.txt
24+
# set DWARFv4 as debug format for clang, since it creates DWARFv5 as default which isn't support in old valgrind
25+
[ -z "$(echo $CC | grep "clang")" ] || GFLAG="-gdwarf-4"
26+
27+
make -j$MAKE_JOBS CFLAGS="$2 $CFLAGS $4 $GFLAG" EXTRALIBS="$5" test LTC_DEBUG=1 1>gcc_1.txt 2>gcc_2.txt
2528

2629
echo "Run tests with valgrind..."
2730

0 commit comments

Comments
 (0)