Skip to content

Commit

Permalink
CI: fix error when mixing clang 14 with released valgrind versions
Browse files Browse the repository at this point in the history
Because clang now defaults to a dwarf version that valgrind does not yet
support. There's support in valgrind git master, though.
  • Loading branch information
eli-schwartz authored and nirbheek committed Aug 12, 2022
1 parent 62a95ef commit 9e7b214
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions mesonbuild/mesonlib/__init__.py
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


"""Helper functions and classes."""

import os
Expand Down
7 changes: 7 additions & 0 deletions test cases/unit/2 testsetups/meson.build
Expand Up @@ -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')
Expand Down

0 comments on commit 9e7b214

Please sign in to comment.