compilers: Honor <lang>_ld when linking C-like outputs

This commit is contained in:
Ole André Vadla Ravnås 2020-04-10 03:10:27 +00:00 committed by Jussi Pakkanen
parent 1100484148
commit c0a8abc580
1 changed files with 4 additions and 0 deletions

View File

@ -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