summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2024-03-09 03:26:05 +0800
committerMarge Bot <emma+marge@anholt.net>2024-03-22 18:22:34 +0000
commit0578f13fc93edf954b75ecf206410366b3712ff2 (patch)
tree4daf15f4001701c2d507fb04e8094fe3235d607a /meson.build
parent5d3ce49e76c7d8baf29eb071cfe4f1912a46139a (diff)
meson: Define MESA_DEBUG for latter usage
rationale: DEBUG is easily conflict with third-party headers, for example LLVM https://github.com/llvm/llvm-project/issues/24002#issuecomment-1673922017 And amdcommon's addrlib And according to https://github.com/llvm/llvm-project/issues/24002#issuecomment-1673922017 LLVM is already switched to LLVM_DEBUG, I think it's time for mesa switch to MESA_DEBUG for #ifdef DEBUG. Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index f4b3152b017..bf2612ebc38 100644
--- a/meson.build
+++ b/meson.build
@@ -961,6 +961,10 @@ if with_mesa_debug
pre_args += '-DDEBUG'
endif
+# Define MESA_DEBUG to 1 for debug builds only (debugoptimized is not included on this one);
+# otherwise define MESA_DEBUG to 0
+pre_args += '-DMESA_DEBUG=' + (with_mesa_debug ? '1' : '0')
+
with_shader_cache = get_option('shader-cache') \
.require(host_machine.system() != 'windows', error_message : 'Shader Cache does not currently work on Windows') \
.allowed()