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>
This commit is contained in:
@@ -82,7 +82,7 @@ debian-testing:
|
|||||||
BUILDTYPE: "debugoptimized"
|
BUILDTYPE: "debugoptimized"
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D spirv-to-dxil=true
|
-D spirv-to-dxil=true
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
-D perfetto=true
|
-D perfetto=true
|
||||||
MINIO_ARTIFACT_NAME: mesa-amd64
|
MINIO_ARTIFACT_NAME: mesa-amd64
|
||||||
LLVM_VERSION: "13"
|
LLVM_VERSION: "13"
|
||||||
@@ -101,7 +101,7 @@ debian-testing-asan:
|
|||||||
-Wno-error=stringop-truncation
|
-Wno-error=stringop-truncation
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D b_sanitize=address
|
-D b_sanitize=address
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
-D tools=dlclose-skip
|
-D tools=dlclose-skip
|
||||||
MINIO_ARTIFACT_NAME: ""
|
MINIO_ARTIFACT_NAME: ""
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||||
@@ -138,7 +138,7 @@ debian-testing-msan:
|
|||||||
GALLIUM_DRIVERS: "swrast"
|
GALLIUM_DRIVERS: "swrast"
|
||||||
BUILDTYPE: "debugoptimized"
|
BUILDTYPE: "debugoptimized"
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
script:
|
script:
|
||||||
- .gitlab-ci/meson/build.sh
|
- .gitlab-ci/meson/build.sh
|
||||||
- .gitlab-ci/prepare-artifacts.sh
|
- .gitlab-ci/prepare-artifacts.sh
|
||||||
@@ -332,7 +332,7 @@ debian-android:
|
|||||||
-D android-stub=true
|
-D android-stub=true
|
||||||
-D llvm=disabled
|
-D llvm=disabled
|
||||||
-D platform-sdk-version=29
|
-D platform-sdk-version=29
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
GALLIUM_ST: >
|
GALLIUM_ST: >
|
||||||
-D dri3=disabled
|
-D dri3=disabled
|
||||||
-D gallium-vdpau=disabled
|
-D gallium-vdpau=disabled
|
||||||
@@ -394,7 +394,7 @@ debian-armhf:
|
|||||||
CROSS: armhf
|
CROSS: armhf
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D llvm=disabled
|
-D llvm=disabled
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
MINIO_ARTIFACT_NAME: mesa-armhf
|
MINIO_ARTIFACT_NAME: mesa-armhf
|
||||||
# The strip command segfaults, failing to strip the binary and leaving
|
# The strip command segfaults, failing to strip the binary and leaving
|
||||||
# tempfiles in our artifacts.
|
# tempfiles in our artifacts.
|
||||||
@@ -411,7 +411,7 @@ debian-arm64:
|
|||||||
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
|
VULKAN_DRIVERS: "freedreno,broadcom,panfrost,imagination-experimental"
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D llvm=disabled
|
-D llvm=disabled
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
-D imagination-srv=true
|
-D imagination-srv=true
|
||||||
-D perfetto=true
|
-D perfetto=true
|
||||||
MINIO_ARTIFACT_NAME: mesa-arm64
|
MINIO_ARTIFACT_NAME: mesa-arm64
|
||||||
@@ -426,7 +426,7 @@ debian-arm64-asan:
|
|||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D llvm=disabled
|
-D llvm=disabled
|
||||||
-D b_sanitize=address
|
-D b_sanitize=address
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
-D tools=dlclose-skip
|
-D tools=dlclose-skip
|
||||||
ARTIFACTS_DEBUG_SYMBOLS: 1
|
ARTIFACTS_DEBUG_SYMBOLS: 1
|
||||||
MINIO_ARTIFACT_NAME: mesa-arm64-asan
|
MINIO_ARTIFACT_NAME: mesa-arm64-asan
|
||||||
@@ -527,7 +527,7 @@ windows-vs2019:
|
|||||||
-D egl=disabled
|
-D egl=disabled
|
||||||
-D gbm=disabled
|
-D gbm=disabled
|
||||||
EXTRA_OPTION: >
|
EXTRA_OPTION: >
|
||||||
-D valgrind=false
|
-D valgrind=disabled
|
||||||
|
|
||||||
debian-clover:
|
debian-clover:
|
||||||
extends: .debian-cl
|
extends: .debian-cl
|
||||||
|
18
meson.build
18
meson.build
@@ -1826,21 +1826,9 @@ if with_glvnd
|
|||||||
pre_args += '-DUSE_LIBGLVND=1'
|
pre_args += '-DUSE_LIBGLVND=1'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_valgrind = get_option('valgrind')
|
dep_valgrind = dependency('valgrind', required : get_option('valgrind'))
|
||||||
if _valgrind == 'true'
|
if dep_valgrind.found()
|
||||||
_valgrind = 'enabled'
|
pre_args += '-DHAVE_VALGRIND'
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# AddressSanitizer's leak reports need all the symbols to be present at exit to
|
# AddressSanitizer's leak reports need all the symbols to be present at exit to
|
||||||
|
@@ -335,9 +335,7 @@ option(
|
|||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
'valgrind',
|
'valgrind',
|
||||||
type : 'combo',
|
type : 'feature',
|
||||||
value : 'auto',
|
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
|
||||||
description : 'Build with valgrind support'
|
description : 'Build with valgrind support'
|
||||||
)
|
)
|
||||||
option(
|
option(
|
||||||
|
Reference in New Issue
Block a user