aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Harris <pharris@opentext.com>2020-08-12 21:09:54 -0400
committerPeter Harris <peter@harr.ca>2020-08-17 21:21:33 -0400
commit7b0c1e2349f044ba8979cf2430cb3ceb5c9c8cfd (patch)
tree7efeaf86459ddcb6e7e351fa74a766c291b6fc27
parent0f90299b1c5ba98a685e6545fcc6eda5acbe996d (diff)
downloadmeson-7b0c1e2349f044ba8979cf2430cb3ceb5c9c8cfd.zip
meson-7b0c1e2349f044ba8979cf2430cb3ceb5c9c8cfd.tar.gz
meson-7b0c1e2349f044ba8979cf2430cb3ceb5c9c8cfd.tar.bz2
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.
-rw-r--r--mesonbuild/compilers/mixins/clike.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index 95b9592..60468a1 100644
--- a/mesonbuild/compilers/mixins/clike.py
+++ b/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]: