summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-03-07 11:52:26 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2017-03-07 15:28:18 +0000
commitd0a1a4e6767da8a2455b8822446978b35813161d (patch)
tree8326bc5dfc572c5c457fe0eaf44d82d07cf07b7a /src
parentf19f943a6699d771ef85402998a56743d6dfa3d9 (diff)
downloadlibepoxy-d0a1a4e6767da8a2455b8822446978b35813161d.tar.gz
Add explicit version flags for macOS builds
Autotools automatically adds version related linker flags on macOS that are not related to the version information. Since we want to maintain binary compatibility, we should do the same when building on macOS. Fixes: #108
Diffstat (limited to 'src')
-rw-r--r--src/meson.build8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/meson.build b/src/meson.build
index ecd032a..4dbb3eb 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -51,10 +51,14 @@ foreach h: headers
epoxy_headers += join_paths(meson.source_root(), 'include/epoxy/@0@'.format(h))
endforeach
+common_ldflags = []
if cc.get_id() == 'gcc'
common_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
-else
- common_ldflags = []
+endif
+
+# Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108
+if host_system == 'darwin'
+ common_ldflags += [ '-compatibility_version=1', '-current_version=1.0', ]
endif
epoxy_deps = [ dl_dep, ]