From 83e83444dbe68a07ee35a489edcfa71f5bf200e7 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 17 Mar 2019 14:38:39 +0100 Subject: [PATCH] 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',