aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-08-11 07:13:33 -0400
committerDylan Baker <dylan@pnwbakers.com>2022-08-11 08:05:48 -0700
commit6db9a014497761efa19e953e67645c8c0690820c (patch)
treefb3b9b7f77a2ebeb10b0b8393237aebdfa1f72f8 /test cases
parent00f8ced0486d495ce83ab32c6065dd8ea96f63e8 (diff)
downloadmeson-6db9a014497761efa19e953e67645c8c0690820c.zip
meson-6db9a014497761efa19e953e67645c8c0690820c.tar.gz
meson-6db9a014497761efa19e953e67645c8c0690820c.tar.bz2
CI: fix error when mixing clang 14 with released valgrind versions
Because clang now defaults to a dwarf version that valgrind does not yet support. There's support in valgrind git master, though.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/unit/2 testsetups/meson.build7
1 files changed, 7 insertions, 0 deletions
diff --git a/test cases/unit/2 testsetups/meson.build b/test cases/unit/2 testsetups/meson.build
index 1e8f018..91a5fbe 100644
--- a/test cases/unit/2 testsetups/meson.build
+++ b/test cases/unit/2 testsetups/meson.build
@@ -2,6 +2,13 @@ project('testsetups', 'c')
vg = find_program('valgrind')
+cc = meson.get_compiler('c')
+# clang 14 uses dwarf 5, and valgrind 3.19 GIT does not support this
+if cc.get_id() == 'clang' and cc.version().version_compare('>=14') and \
+ vg.version().version_compare('<3.20')
+ add_project_arguments('-gdwarf-4', language: 'c')
+endif
+
# This is only set when running under Valgrind test setup.
env = environment()
env.set('TEST_ENV', '1')