aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle André Vadla RavnÄs <oleavr@gmail.com>2020-04-10 03:10:27 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2020-04-17 18:23:40 +0300
commitc0a8abc5809e0ecd72d6180a40acbf05cefbc427 (patch)
tree08ebaa038ce9ad1ae5fa9f7c5c18becab169e4cd
parent1100484148163af4ea9c9515de763082494ea12f (diff)
downloadmeson-c0a8abc5809e0ecd72d6180a40acbf05cefbc427.zip
meson-c0a8abc5809e0ecd72d6180a40acbf05cefbc427.tar.gz
meson-c0a8abc5809e0ecd72d6180a40acbf05cefbc427.tar.bz2
compilers: Honor <lang>_ld when linking C-like outputs
-rw-r--r--mesonbuild/compilers/mixins/clike.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
index cd16f86..41848bc 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