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.
macos/v1.5.9
Emmanuele Bassi 8 years ago
parent abe6a80412
commit 5616bbf352
  1. 6
      src/meson.build

@ -50,7 +50,11 @@ epoxy_sources = sources + gen_sources
common_ldflags = [] common_ldflags = []
if host_system == 'linux' 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 endif
# Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108 # Maintain compatibility with autotools; see: https://github.com/anholt/libepoxy/issues/108

Loading…
Cancel
Save