summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-02 23:11:06 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-02 23:11:06 +0100
commit5616bbf3528a9a6264791fd7c9a6969f136f40f3 (patch)
tree490bd3d57f9aea00d1c01cad4cb12a2d988d3ce4 /src
parentabe6a80412891cd9cfdb22a66a2b2a773fc4eb3b (diff)
downloadlibepoxy-5616bbf3528a9a6264791fd7c9a6969f136f40f3.tar.gz
build: Check for linker flags on Linux
We can build Epoxy with different compilers on Linux, and they may not support all the linker flags we wish to use, so we should check whether or not they exist.
Diffstat (limited to 'src')
-rw-r--r--src/meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/meson.build b/src/meson.build
index 6f44220..3d48a4d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -50,7 +50,11 @@ epoxy_sources = sources + gen_sources
common_ldflags = []
if host_system == 'linux'
- common_ldflags = [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
+ foreach f: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
+ if cc.has_argument(f)
+ common_ldflags += f
+ endif
+ endforeach
endif
# Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108