[tracker/wip/carlosg/meson-fixes: 7/8] libtracker-miner: Add linker script



commit 22db2b489bcb8df74f8a69193e908a47ca516e77
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Sep 5 00:12:12 2018 +0200

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

 src/libtracker-miner/meson.build         |  4 ++++
 src/libtracker-miner/tracker-miner-2.map | 13 +++++++++++++
 2 files changed, 17 insertions(+)
---
diff --git a/src/libtracker-miner/meson.build b/src/libtracker-miner/meson.build
index 9565c5418..b7325d07e 100644
--- a/src/libtracker-miner/meson.build
+++ b/src/libtracker-miner/meson.build
@@ -52,6 +52,9 @@ if have_network_manager
     tracker_miner_dependencies += network_manager
 endif
 
+mapfile = 'tracker-miner-2.map'
+vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
+
 libtracker_miner = library(
     'tracker-miner-' + tracker_api_version,
     miner_enums[0], miner_enums[1], miner_sources,
@@ -63,6 +66,7 @@ libtracker_miner = library(
     # https://github.com/mesonbuild/meson/issues/671
     include_directories: [commoninc, configinc, srcinc],
     dependencies: [tracker_sparql_dep] + tracker_miner_dependencies,
+    link_args: vflag,
     link_with: [libtracker_miner_private],
 )
 
diff --git a/src/libtracker-miner/tracker-miner-2.map b/src/libtracker-miner/tracker-miner-2.map
new file mode 100644
index 000000000..b29fc4bd9
--- /dev/null
+++ b/src/libtracker-miner/tracker-miner-2.map
@@ -0,0 +1,13 @@
+{
+global:
+  tracker_data_provider_*;
+  tracker_miner_*;
+  tracker_indexing_tree_*;
+  tracker_directory_flags_*;
+  tracker_filter_type_*;
+  tracker_filter_policy_*;
+  tracker_network_type_*;
+  tracker_decorator_*;
+local:
+  *;
+};


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