Browse Source

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 <[email protected]>
Steffen Jaeckel 2 years ago
parent
commit
e1a52a5b94
1 changed files with 4 additions and 1 deletions
  1. 4 1
      .ci/valgrind.sh

+ 4 - 1
.ci/valgrind.sh

@@ -21,7 +21,10 @@ make clean &>/dev/null
 
 echo "Build for valgrind..."
 
-make -j$MAKE_JOBS CFLAGS="$2 $CFLAGS $4" EXTRALIBS="$5" test LTC_DEBUG=1 1>gcc_1.txt 2>gcc_2.txt
+# set DWARFv4 as debug format for clang, since it creates DWARFv5 as default which isn't support in old valgrind
+[ -z "$(echo $CC | grep "clang")" ] || GFLAG="-gdwarf-4"
+
+make -j$MAKE_JOBS CFLAGS="$2 $CFLAGS $4 $GFLAG" EXTRALIBS="$5" test LTC_DEBUG=1 1>gcc_1.txt 2>gcc_2.txt
 
 echo "Run tests with valgrind..."