From 6db9a014497761efa19e953e67645c8c0690820c Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 11 Aug 2022 07:13:33 -0400 Subject: 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. --- mesonbuild/mesonlib/__init__.py | 1 + test cases/unit/2 testsetups/meson.build | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/mesonbuild/mesonlib/__init__.py b/mesonbuild/mesonlib/__init__.py index 5b2e82d..9d673fd 100644 --- a/mesonbuild/mesonlib/__init__.py +++ b/mesonbuild/mesonlib/__init__.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + """Helper functions and classes.""" import os 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') -- cgit v1.1