[geary] Tidy up inclusion of libunwind in the Meson build.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Tidy up inclusion of libunwind in the Meson build.
- Date: Fri, 12 Jan 2018 07:21:51 +0000 (UTC)
commit 5456dab49c4c5cee944af001c4d8c73dc9b398b1
Author: Michael James Gratton <mike vee net>
Date: Fri Jan 12 16:05:49 2018 +1100
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.
meson.build | 11 ++++++-----
src/meson.build | 3 +++
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index 49b7aaa..5874a98 100644
--- a/meson.build
+++ b/meson.build
@@ -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)
diff --git a/src/meson.build b/src/meson.build
index 103502e..ae1a470 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]