]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Build with frame pointers in developer mode
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 8 Jun 2022 20:32:49 +0000 (22:32 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 9 Jun 2022 16:44:26 +0000 (17:44 +0100)
Profiling tools tend to work better when binaries and libraries
are compiled with frame pointers as without them there's no easy
and fast way to get the current stacktrace.

meson.build

index 9adb2160a4ed00ded77cebe05e10b1508fdcc8d5..4a114ed51b9fb1ed5bdb00f1d2574415e768ebb7 100644 (file)
@@ -450,6 +450,10 @@ if get_option('buildtype') != 'debug'
         possible_link_flags += '-Wl,--gc-sections'
 endif
 
+if get_option('mode') == 'developer'
+        possible_cc_flags += '-fno-omit-frame-pointer'
+endif
+
 add_project_arguments(cc.get_supported_arguments(basic_disabled_warnings), language : 'c')
 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
 add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')