[gnome-builder/gnome-builder-3-30: 2/2] build: separate assertion checks



commit 52118ac83ff34d8516f276ae545e710ac8e6927b
Author: Christian Hergert <chergert redhat com>
Date:   Mon Sep 10 20:48:23 2018 -0700

    build: separate assertion checks
    
    When doing release builds, we want to make sure we still have g_assert()
    compiled into the various tests.
    
    Fixes #625

 meson.build             | 8 ++++----
 src/gstyle/meson.build  | 1 +
 src/libide/meson.build  | 2 +-
 src/meson.build         | 4 ++--
 src/plugins/meson.build | 2 +-
 5 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 45314a2d5..b1239c8ec 100644
--- a/meson.build
+++ b/meson.build
@@ -200,6 +200,7 @@ endif
 
 add_project_arguments(global_c_args, language: 'c')
 
+release_args = []
 global_link_args = []
 test_link_args = [
   '-Wl,-z,relro',
@@ -208,10 +209,9 @@ test_link_args = [
 if not get_option('buildtype').startswith('debug')
 
   # TODO: Maybe reuse 'b_ndebug' option
-  add_global_arguments([
-    '-DG_DISABLE_CAST_CHECKS',
-    '-DG_DISABLE_ASSERT',
-  ], language: 'c')
+  add_global_arguments(['-DG_DISABLE_CAST_CHECKS'], language: 'c')
+
+  release_args += [ '-DG_DISABLE_ASSERT' ]
 
   test_link_args += [
     '-Wl,-Bsymbolic',
diff --git a/src/gstyle/meson.build b/src/gstyle/meson.build
index 2f630e340..4fe328750 100644
--- a/src/gstyle/meson.build
+++ b/src/gstyle/meson.build
@@ -83,6 +83,7 @@ endif
 libgstyle = shared_library('gstyle-private', libgstyle_sources,
   dependencies: libgstyle_deps,
      link_args: libgstyle_link_args,
+        c_args: release_args,
   link_depends: 'gstyle.map',
        version: '0.0.0',
        install: true,
diff --git a/src/libide/meson.build b/src/libide/meson.build
index a935fc869..249623891 100644
--- a/src/libide/meson.build
+++ b/src/libide/meson.build
@@ -234,7 +234,7 @@ libide_args += hidden_visibility_args
 libide = shared_library('ide-' + libide_api_version,
   libide_resources + libide_icons_resources + libide_sources,
   dependencies: libide_deps,
-        c_args: libide_args,
+        c_args: libide_args + release_args,
        install: true,
    install_dir: pkglibdir_abs,
  install_rpath: pkglibdir_abs,
diff --git a/src/meson.build b/src/meson.build
index 5df0497db..6be920151 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -16,7 +16,7 @@ gnome_builder_sources = [
 executable('gnome-builder', gnome_builder_sources,
            gui_app: true,
            install: true,
-            c_args: exe_c_args,
+            c_args: exe_c_args + release_args,
          link_args: exe_link_args,
      install_rpath: pkglibdir_abs,
       dependencies: gnome_builder_plugins_deps + [libide_dep, gnome_builder_plugins_dep],
@@ -28,7 +28,7 @@ if get_option('fusermount_wrapper')
              gui_app: false,
              install: true,
          install_dir: get_option('bindir'),
-              c_args: exe_c_args,
+              c_args: exe_c_args + release_args,
            link_args: exe_link_args,
        install_rpath: pkglibdir_abs,
         dependencies: [libide_deps, libide_dep],
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 239f41267..bd9983193 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -81,7 +81,7 @@ gnome_builder_plugins = shared_library(
 
    dependencies: gnome_builder_plugins_deps,
    link_depends: 'plugins.map',
-         c_args: gnome_builder_plugins_args,
+         c_args: gnome_builder_plugins_args + release_args,
       link_args: gnome_builder_plugins_link_args,
       link_with: gnome_builder_plugins_link_with,
         install: true,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]