diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-05-02 23:11:06 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-05-02 23:11:06 +0100 |
commit | 5616bbf3528a9a6264791fd7c9a6969f136f40f3 (patch) | |
tree | 490bd3d57f9aea00d1c01cad4cb12a2d988d3ce4 /src/meson.build | |
parent | abe6a80412891cd9cfdb22a66a2b2a773fc4eb3b (diff) | |
download | libepoxy-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/meson.build')
-rw-r--r-- | src/meson.build | 6 |
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 |