From c0a8abc5809e0ecd72d6180a40acbf05cefbc427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Fri, 10 Apr 2020 03:10:27 +0000 Subject: [PATCH] compilers: Honor _ld when linking C-like outputs --- mesonbuild/compilers/mixins/clike.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index cd16f86f2..41848bccc 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -304,6 +304,10 @@ class CLikeCompiler: cargs += cleaned_sys_args if mode == 'link': + ld_value = env.lookup_binary_entry(self.for_machine, self.language + '_ld') + if ld_value is not None: + largs += self.use_linker_args(ld_value[0]) + # Add LDFLAGS from the env sys_ld_args = env.coredata.get_external_link_args(self.for_machine, self.language) # CFLAGS and CXXFLAGS go to both linking and compiling, but we want them