[libgweather/wip/hadess/fixes: 1/13] build: Use external file as a symbol export map
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/wip/hadess/fixes: 1/13] build: Use external file as a symbol export map
- Date: Tue, 12 Jan 2021 09:53:04 +0000 (UTC)
commit f82ba4562dbe7b2c5b9ff76f9bab9ebd0b1a1072
Author: Bastien Nocera <hadess hadess net>
Date: Mon Jan 11 14:21:58 2021 +0100
build: Use external file as a symbol export map
Rather than relying on GWEATHER_EXTERN.
libgweather/libgweather.map | 10 ++++++++++
libgweather/meson.build | 10 ++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/libgweather/libgweather.map b/libgweather/libgweather.map
new file mode 100644
index 00000000..0e89eac7
--- /dev/null
+++ b/libgweather/libgweather.map
@@ -0,0 +1,10 @@
+{
+ global:
+ gweather_*;
+ _gweather_location_reset_world;
+ _radians_to_degrees_str;
+
+ local:
+ *;
+};
+
diff --git a/libgweather/meson.build b/libgweather/meson.build
index 73372149..6a055a49 100644
--- a/libgweather/meson.build
+++ b/libgweather/meson.build
@@ -6,6 +6,14 @@ add_project_arguments([
], language: 'c')
header_subdir = 'libgweather-3.0/libgweather'
+libgweather_map = join_paths(meson.current_source_dir(), 'libgweather.map')
+link_depends = []
+link_args = []
+
+if c_compiler.has_link_argument('-Wl,--version-script,' + libgweather_map)
+ link_depends += libgweather_map
+ link_args += ['-Wl,--version-script,' + libgweather_map]
+endif
versionconf = configuration_data()
versionconf.set('GWEATHER_MAJOR_VERSION', libgweather_version[0])
@@ -59,6 +67,8 @@ lib_libgweather = shared_library('gweather-3',
gweather_c_sources,
include_directories: root_inc,
dependencies: deps_libgweather,
+ link_depends: link_depends,
+ link_args: link_args,
version: libgweather_so_version,
darwin_versions: libgweather_darwin_versions,
install: true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]