summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan.c.baker@intel.com>2022-12-20 15:38:10 -0800
committerMarge Bot <emma+marge@anholt.net>2023-01-19 16:29:03 +0000
commit3f10a89180b5638d2c1870e91e06aeae67925717 (patch)
tree2514b86c6447245f57e14fbfd60c48629bf48e4b
parentd00c6e0fd754534ff493c9a58f3092eeb27343ff (diff)
downloadmesa-3f10a89180b5638d2c1870e91e06aeae67925717.tar.gz
meson: use a feature option for valgrind
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20409>
-rw-r--r--.gitlab-ci/build/gitlab-ci.yml16
-rw-r--r--meson.build18
-rw-r--r--meson_options.txt4
3 files changed, 12 insertions, 26 deletions
diff --git a/.gitlab-ci/build/gitlab-ci.yml b/.gitlab-ci/build/gitlab-ci.yml
index e3171e2a181..74160fc30c1 100644
--- a/.gitlab-ci/build/gitlab-ci.yml
+++ b/.gitlab-ci/build/gitlab-ci.yml
@@ -82,7 +82,7 @@ debian-testing:
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
-D spirv-to-dxil=true
- -D valgrind=false
+ -D valgrind=disabled
-D perfetto=true
MINIO_ARTIFACT_NAME: mesa-amd64
LLVM_VERSION: "13"
@@ -101,7 +101,7 @@ debian-testing-asan:
-Wno-error=stringop-truncation
EXTRA_OPTION: >
-D b_sanitize=address
- -D valgrind=false
+ -D valgrind=disabled
-D tools=dlclose-skip
MINIO_ARTIFACT_NAME: ""
ARTIFACTS_DEBUG_SYMBOLS: 1
@@ -138,7 +138,7 @@ debian-testing-msan:
GALLIUM_DRIVERS: "swrast"
BUILDTYPE: "debugoptimized"
EXTRA_OPTION: >
- -D valgrind=false
+ -D valgrind=disabled
script:
- .gitlab-ci/meson/build.sh
- .gitlab-ci/prepare-artifacts.sh
@@ -332,7 +332,7 @@ debian-android:
-D android-stub=true
-D llvm=disabled
-D platform-sdk-version=29
- -D valgrind=false
+ -D valgrind=disabled
GALLIUM_ST: >
-D dri3=disabled
-D gallium-vdpau=disabled
@@ -394,7 +394,7 @@ debian-armhf:
CROSS: armhf
EXTRA_OPTION: >
-D llvm=disabled
- -D valgrind=false
+ -D valgrind=disabled
MINIO_ARTIFACT_NAME: mesa-armhf
# The strip command segfaults, failing to strip the binary and leaving
# tempfiles in our artifacts.
@@ -411,7 +411,7 @@ debian-arm64:
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
EXTRA_OPTION: >
-D llvm=disabled
- -D valgrind=false
+ -D valgrind=disabled
-D imagination-srv=true
-D perfetto=true
MINIO_ARTIFACT_NAME: mesa-arm64
@@ -426,7 +426,7 @@ debian-arm64-asan:
EXTRA_OPTION: >
-D llvm=disabled
-D b_sanitize=address
- -D valgrind=false
+ -D valgrind=disabled
-D tools=dlclose-skip
ARTIFACTS_DEBUG_SYMBOLS: 1
MINIO_ARTIFACT_NAME: mesa-arm64-asan
@@ -527,7 +527,7 @@ windows-vs2019:
-D egl=disabled
-D gbm=disabled
EXTRA_OPTION: >
- -D valgrind=false
+ -D valgrind=disabled
debian-clover:
extends: .debian-cl
diff --git a/meson.build b/meson.build
index e3fd954c983..99a8b5b388e 100644
--- a/meson.build
+++ b/meson.build
@@ -1826,21 +1826,9 @@ if with_glvnd
pre_args += '-DUSE_LIBGLVND=1'
endif
-_valgrind = get_option('valgrind')
-if _valgrind == 'true'
- _valgrind = 'enabled'
- warning('valgrind option "true" deprecated, please use "enabled" instead.')
-elif _valgrind == 'false'
- _valgrind = 'disabled'
- warning('valgrind option "false" deprecated, please use "disabled" instead.')
-endif
-if _valgrind != 'disabled'
- dep_valgrind = dependency('valgrind', required : _valgrind == 'enabled')
- if dep_valgrind.found()
- pre_args += '-DHAVE_VALGRIND'
- endif
-else
- dep_valgrind = null_dep
+dep_valgrind = dependency('valgrind', required : get_option('valgrind'))
+if dep_valgrind.found()
+ pre_args += '-DHAVE_VALGRIND'
endif
# AddressSanitizer's leak reports need all the symbols to be present at exit to
diff --git a/meson_options.txt b/meson_options.txt
index 74712b9dc93..da93e9b6f22 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -335,9 +335,7 @@ option(
)
option(
'valgrind',
- type : 'combo',
- value : 'auto',
- choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
+ type : 'feature',
description : 'Build with valgrind support'
)
option(