find_library: include get_linker_always_args in link args

The linker always args, as the name implies, should always be included. For
example, the AIX get_allow_undefined_link_args are a syntax error unless
the AIX get_linker_always_args are also used.
pull/7581/head
Peter Harris 4 years ago committed by Peter Harris
parent 0f90299b1c
commit 7b0c1e2349
  1. 2
      mesonbuild/compilers/mixins/clike.py

@ -1033,7 +1033,7 @@ class CLikeCompiler:
if ((not extra_dirs and libtype is LibType.PREFER_SHARED) or
libname in self.internal_libs):
cargs = ['-l' + libname]
largs = self.get_allow_undefined_link_args()
largs = self.get_linker_always_args() + self.get_allow_undefined_link_args()
extra_args = cargs + self.linker_to_compiler_args(largs)
if self.links(code, env, extra_args=extra_args, disable_cache=True)[0]:

Loading…
Cancel
Save