[gtksourceview] build: use static libraries for testsuite
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] build: use static libraries for testsuite
- Date: Wed, 29 Jan 2020 18:54:47 +0000 (UTC)
commit 1155e90c9de0512879c479287792d651378eb3b5
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 29 10:46:01 2020 -0800
build: use static libraries for testsuite
This will allow us to use more aggressive optimizations on the primary
libgtksourceview-4.so such as -Wl,Bsymbolic and -fno-plt.
testsuite/meson.build | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/testsuite/meson.build b/testsuite/meson.build
index f0c51fe7..fdc536ab 100644
--- a/testsuite/meson.build
+++ b/testsuite/meson.build
@@ -45,11 +45,20 @@ foreach test: testsuite_sources
'@0@.c'.format(test_name),
]
- # MSVC builds: We need to link to the main GtkSourceView .lib except
- # for test-stylescheme.c, where we must link only to the static core lib
+ # To allow our installed libraries to have some optimizations like
+ # -Wl,Bsymbolic we cannot link against them here. It would cause
+ # duplicate type registration which is an error for GObject.
+ #
+ # Furthermore, for MSVC we need to link to the main GtkSourceView .lib
+ # except for test-stylescheme.c, where we must link only to the static core
+ # lib.
+ #
+ # So instead we just always link the static libraries. Since these don't
+ # get installed in the vast majority of cases, that is worth the extra
+ # link and size bloat to make the common case better.
test_exe = executable(test_name, test_sources,
c_args: testsuite_c_args,
- dependencies: cc.get_id() == 'msvc' and test_name == 'test-stylescheme' ? [core_dep] : [gtksource_dep],
+ dependencies: [core_dep, completionwords_dep],
install: get_option('install_tests'),
install_dir: testexecdir
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]