[gtk] build: Do not eagerly disable checks on release builds
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] build: Do not eagerly disable checks on release builds
- Date: Tue, 20 Feb 2018 13:27:39 +0000 (UTC)
commit 88d419456d9897434365d9cab723cc7420791bc8
Author: Emmanuele Bassi <ebassi gnome org>
Date: Tue Feb 20 13:19:31 2018 +0000
build: Do not eagerly disable checks on release builds
Release builds should only disable cast checks, to match what we used
to do back with the Autotools builds.
The Autotools build had an "--enable-debug=no" option, but that was
rarely used; Meson has debug, debugoptimized, release, and plain build
types, but we considered the "release" build types as the old "disable
all debugging code", which is not really accurate.
Disabling assertions and preconditon checks should be left to people
with constrained environments and/or packagers; they are supposed to
use the "plain" build type, and override the CFLAGS themselves.
meson.build | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index aa6aaa8d19..b778b5fa8e 100644
--- a/meson.build
+++ b/meson.build
@@ -61,15 +61,13 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c')
gtk_debug_cflags = []
buildtype = get_option('buildtype')
-if buildtype == 'debugoptimized' or buildtype == 'debug'
+if buildtype.startswith('debug')
gtk_debug_cflags += '-DG_ENABLE_DEBUG'
if buildtype == 'debug'
gtk_debug_cflags += '-DG_ENABLE_CONSISTENCY_CHECKS'
- else
- gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS'
endif
-else
- gtk_debug_cflags += [ '-DG_DISABLE_ASSERT', '-DG_DISABLE_CAST_CHECKS', '-DG_DISABLE_CHECKS', ]
+elif buildtype == 'release'
+ gtk_debug_cflags += '-DG_DISABLE_CAST_CHECKS'
endif
add_project_arguments(gtk_debug_cflags, language: 'c')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]