Tidy up inclusion of libunwind in the Meson build.

* meson.build: Use libunwind and libunwind-generic to avoid having to
  search for the platform-specific lib.

* src/meson.build: Set UNW_LOCAL_ONLY define to get the most optimal
  unwind impl.
This commit is contained in:
Michael James Gratton 2018-01-12 16:05:49 +11:00
parent d7ed670fe4
commit 5456dab49c
2 changed files with 9 additions and 5 deletions

View file

@ -63,11 +63,12 @@ javascriptcoregtk_lib = cc.find_library('javascriptcoregtk-4.0', version: '>=' +
javascriptcoregtk_vapi = valac.find_library('javascriptcore-4.0', dirs: vapi_dir)
enchant = dependency('enchant', version: '>= 1.6')
libunwind = declare_dependency(
dependencies: [
dependency('libunwind', version: '>= 1.1'),
cc.find_library('libunwind-' + target_machine.cpu_family()),
],
)
dependencies: [
valac.find_library('libunwind', dirs: vapi_dir),
cc.find_library('unwind', version: '>= 1.1'),
cc.find_library('unwind-generic', version: '>= 1.1'),
],
)
libunity = dependency('unity', version: '>= 5.12.0', required: false)
libmessagingmenu = meson.get_compiler('c').find_library('libmessaging-menu', required: false)

View file

@ -24,6 +24,9 @@ endif
geary_c_options = [
'-include', 'config.h',
# Select libunwind's optimised, local-only backtrace unwiding. See
# libunwind(3).
'-DUNW_LOCAL_ONLY',
# Vala causes a _lot_ of these to be emitted for otherwise valid
# code. Suppress them so we can actually see more useful warnings.
'-Wno-incompatible-pointer-types',