[gnome-shell] meson: Add some compiler arguments to debug builds



commit 83e83444dbe68a07ee35a489edcfa71f5bf200e7
Author: Robert Mader <robert mader posteo de>
Date:   Sun Mar 17 14:38:39 2019 +0100

    meson: Add some compiler arguments to debug builds
    
    To get better debug information.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/464

 meson.build | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/meson.build b/meson.build
index efe45734e..6e821b8a9 100644
--- a/meson.build
+++ b/meson.build
@@ -209,6 +209,15 @@ supported_warnings = cc.get_supported_arguments(all_warnings)
 
 add_project_arguments(supported_warnings, language: 'c')
 
+if get_option('debug')
+  debug_c_args = [
+    '-DG_ENABLE_DEBUG',
+    '-fno-omit-frame-pointer'
+  ]
+  supported_debug_c_args = cc.get_supported_arguments(debug_c_args)
+  add_project_arguments(supported_debug_c_args, language: 'c')
+endif
+
 config_h = configure_file(
   input: 'config.h.meson',
   output: 'config.h',


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