[dconf/patch/engine-check: 5/5] build: remove libdconf_common_hidden



commit 19eb1de2c1b0a12dfdcb3075bf6a4db57cd9e961
Author: Daniel Playfair Cal <daniel playfair cal gmail com>
Date:   Mon Jan 6 15:52:07 2020 +1100

    build: remove libdconf_common_hidden
    
    Previously there whwere two libraries and two dependencies for libdconf -
    one using `link_with` and one using `link_whole`. The `link_whole` was
    necessary because dconf-editor relies on symboles exported from libdconf
    even if they were not included in dconf-client.h. This commit replaces
    this method of including those symbols with explicitly listing the
    source files in common in the sources list for libdconf.

 client/meson.build    | 10 ++++++++--
 common/meson.build    | 19 +++----------------
 gsettings/abicheck.sh |  2 ++
 gsettings/meson.build |  2 +-
 service/meson.build   |  6 +++---
 5 files changed, 17 insertions(+), 22 deletions(-)
---
diff --git a/client/meson.build b/client/meson.build
index de6387e..f18a60c 100644
--- a/client/meson.build
+++ b/client/meson.build
@@ -10,10 +10,16 @@ install_headers(
   subdir: join_paths('dconf', 'client'),
 )
 
-sources = files('dconf-client.c')
+sources = files(
+  'dconf-client.c',
+  '../common/dconf-changeset.c',
+  '../common/dconf-error.c',
+  '../common/dconf-gvdb-utils.c',
+  '../common/dconf-paths.c',
+)
 
 deps = [
-  libdconf_common_hidden_dep,
+  libdconf_common_dep,
   libdconf_gdbus_thread_dep,
 ]
 
diff --git a/common/meson.build b/common/meson.build
index d876ce0..6190d25 100644
--- a/common/meson.build
+++ b/common/meson.build
@@ -18,21 +18,8 @@ sources = files(
   'dconf-gvdb-utils.c',
 )
 
-libdconf_common = static_library(
-  'dconf-common',
-  sources: sources,
-  include_directories: top_inc,
-  dependencies: [glib_dep, libgvdb_dep],
-  c_args: dconf_c_args,
-  pic: true,
-)
 
-libdconf_common_dep = declare_dependency(
-  dependencies: [glib_dep, libgvdb_dep],
-  link_whole: libdconf_common,
-)
-
-libdconf_common_hidden = static_library(
+libdconf_common = static_library(
   'dconf-common-hidden',
   sources: sources,
   include_directories: top_inc,
@@ -41,7 +28,7 @@ libdconf_common_hidden = static_library(
   pic: true,
 )
 
-libdconf_common_hidden_dep = declare_dependency(
+libdconf_common_dep = declare_dependency(
   dependencies: [glib_dep, libgvdb_dep],
-  link_with: libdconf_common_hidden,
+  link_with: libdconf_common,
 )
diff --git a/gsettings/abicheck.sh b/gsettings/abicheck.sh
index 1dca6ea..28f058d 100755
--- a/gsettings/abicheck.sh
+++ b/gsettings/abicheck.sh
@@ -15,6 +15,8 @@
 #
 # mangle_path
 
+set -x
+
 ${NM:-nm} --dynamic --defined-only $GSETTINGS_LIB > public-abi
 
 test "`\
diff --git a/gsettings/meson.build b/gsettings/meson.build
index a28892d..1c1abbb 100644
--- a/gsettings/meson.build
+++ b/gsettings/meson.build
@@ -2,7 +2,7 @@
 # link_whole; this avoids the gsettings backend module exposing
 # symbols other than g_io_module_*
 backend_deps = [
-  libdconf_common_hidden,
+  libdconf_common,
   libdconf_gdbus_thread,
 ]
 
diff --git a/service/meson.build b/service/meson.build
index 1490b33..51e3090 100644
--- a/service/meson.build
+++ b/service/meson.build
@@ -35,7 +35,7 @@ libdconf_service = static_library(
   sources: lib_sources,
   include_directories: top_inc,
   c_args: dconf_c_args,
-  dependencies: [gio_unix_dep, libdconf_common_hidden_dep],
+  dependencies: [gio_unix_dep, libdconf_common_dep],
   link_with: [
     libdconf_common,
     libdconf_shm,
@@ -45,7 +45,7 @@ libdconf_service = static_library(
 
 libdconf_service_dep = declare_dependency(
   link_with: libdconf_service,
-  dependencies: [gio_unix_dep, libdconf_common_hidden_dep],
+  dependencies: [gio_unix_dep, libdconf_common_dep],
   sources: dconf_generated,
 )
 
@@ -54,7 +54,7 @@ dconf_service = executable(
   sources,
   include_directories: top_inc,
   c_args: dconf_c_args,
-  dependencies: [gio_unix_dep, libdconf_common_hidden_dep],
+  dependencies: [gio_unix_dep, libdconf_common_dep],
   link_with: libdconf_service,
   install: true,
   install_dir: dconf_libexecdir,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]