From 017312ac9e1a5f48a30c6b5cf6317d6c6d531cdb Mon Sep 17 00:00:00 2001 From: Alexandros Theodotou Date: Wed, 9 Sep 2020 16:54:53 +0100 Subject: [PATCH] don't omit frame pointer on debug builds, add drmingw dependency --- meson.build | 21 +++++++++++++++++---- subprojects/drmingw.wrap | 3 +++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 subprojects/drmingw.wrap diff --git a/meson.build b/meson.build index c7f1b5d94..65a6b6ed6 100644 --- a/meson.build +++ b/meson.build @@ -374,8 +374,6 @@ if get_option ('extra_optimizations') if host_machine.cpu() == 'x86_64' test_cflags += [ '-ffast-math', - # this may break the backtrace - '-fomit-frame-pointer', '-fstrength-reduce', '-DPIC', '-fdata-sections', @@ -387,6 +385,16 @@ if get_option ('extra_optimizations') #'-fvisibility=hidden', ] endif + if get_option ('extra_debug_info') or get_option ('debug') or get_option ('buildtype').contains ('debug') + test_cflags += [ + '-fno-omit-frame-pointer', + ] + else + # note: this may break the backtrace + test_cflags += [ + '-fomit-frame-pointer', + ] + endif endif if get_option ('extra_debug_info') @@ -830,8 +838,13 @@ if all_static endif if os_windows - zrythm_deps += cc.find_library ( - 'dbghelp', static: all_static) + #zrythm_deps += cc.find_library ( + #'dbghelp', static: all_static) + drmingw_subproject = cmake.subproject ( + 'drmingw', options: cmake_opts) + drmingw_dep = drmingw_subproject.dependency ( + 'drmingw') + zrythm_deps += drmingw_dep zrythm_deps += jack_dep.partial_dependency ( link_args: false, links: false) else diff --git a/subprojects/drmingw.wrap b/subprojects/drmingw.wrap new file mode 100644 index 000000000..f17ac0672 --- /dev/null +++ b/subprojects/drmingw.wrap @@ -0,0 +1,3 @@ +[wrap-git] +url = https://github.com/jrfonseca/drmingw +revision = 0ec7a6cb768b185271b0015f5dfaef1e44c88849