[tracker/wip/carlosg/meson-fixes: 8/10] libtracker-sparql: Add linker script



commit 1f45411c7e8418a3a23d40e7073c1e853e703e47
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Sep 5 00:08:40 2018 +0200

    libtracker-sparql: Add linker script
    
    So we only export the desired symbols

 src/libtracker-sparql-backend/meson.build          |  4 ++++
 src/libtracker-sparql-backend/tracker-sparql-2.map | 15 +++++++++++++++
 2 files changed, 19 insertions(+)
---
diff --git a/src/libtracker-sparql-backend/meson.build b/src/libtracker-sparql-backend/meson.build
index d76143306..4a4a689b3 100644
--- a/src/libtracker-sparql-backend/meson.build
+++ b/src/libtracker-sparql-backend/meson.build
@@ -1,3 +1,6 @@
+mapfile = 'tracker-sparql-2.map'
+vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
+
 libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
     '../libtracker-common/libtracker-common.vapi',
     '../libtracker-data/libtracker-data.vapi',
@@ -9,6 +12,7 @@ libtracker_sparql = library('tracker-sparql-' + tracker_api_version,
     install: true,
     install_rpath: tracker_internal_libs_dir,
 
+    link_args: vflag,
     link_whole: [libtracker_sparql_intermediate_c, libtracker_sparql_intermediate_vala],
 
     # We need to pass this because link_whole doesn't trigger the .vapi
diff --git a/src/libtracker-sparql-backend/tracker-sparql-2.map 
b/src/libtracker-sparql-backend/tracker-sparql-2.map
new file mode 100644
index 000000000..38cba0046
--- /dev/null
+++ b/src/libtracker-sparql-backend/tracker-sparql-2.map
@@ -0,0 +1,15 @@
+{
+global:
+  tracker_sparql_connection_*;
+  tracker_sparql_cursor_*;
+  tracker_sparql_builder_*;
+  tracker_sparql_escape_*;
+  tracker_sparql_error_*;
+  tracker_sparql_value_*;
+  tracker_sparql_get_*;
+  tracker_namespace_manager_*;
+  tracker_resource_*;
+  tracker_notifier_*;
+local:
+  *;
+};


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