summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-04-03 14:52:24 +0200
committerThomas Haller <thaller@redhat.com>2019-04-03 14:59:08 +0200
commite9c791bc9831aef1f439e7e3fc7188d24ace6c06 (patch)
treecff31f7feb4825d8f18c0f877f06199e623c8a45
parent187e56f4d33717e9012a69f36eacf3ea0a423384 (diff)
downloadNetworkManager-th/gitlab-ci-fixes.tar.gz
contrib/rpm: disable NDEBUG for meson buildsth/gitlab-ci-fixes
For better or worse, our release builds commonly do not disable assertions. That means, - NDEBUG is not set, and assert() is in effect - G_DISABLE_ASSERT is not set, and g_assert() is in effect - G_DISABLE_CHECKS is not set, and g_return*() is in effect. On the other hand, NM_MORE_ASSERTS is not enabled by default and nm_assert() is stripped away. That is the actual purpose of nm_assert(): it is commonly disabled on release builds, while all other assertions are enabled. Note that it is fully supported to build NetworkManager with all kind of assertions disabled. However, such a configuration is not much tested and I would not recommend it for that reason. %meson expands to $ /usr/bin/meson --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled -Db_ndebug=true . x86_64-redhat-linux-gnu $OTHER_ARGS thus passing -DNDEBUG to the meson build. Override that.
-rw-r--r--contrib/fedora/rpm/NetworkManager.spec1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec
index e3293bb7c1..d68f08a89f 100644
--- a/contrib/fedora/rpm/NetworkManager.spec
+++ b/contrib/fedora/rpm/NetworkManager.spec
@@ -475,6 +475,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
%build
%if %{with meson}
%meson \
+ -Db_ndebug=false \
--warnlevel 2 \
%if %{with test}
--werror \