backends: check external rpaths for all languages using ldflags

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
pull/7671/head
James Hilliard 4 years ago committed by Jussi Pakkanen
parent 97177bc12a
commit 646ae846be
  1. 4
      mesonbuild/backend/backends.py
  2. 1
      mesonbuild/compilers/__init__.py

@ -29,6 +29,7 @@ from .. import build
from .. import dependencies
from .. import mesonlib
from .. import mlog
from ..compilers import languages_using_ldflags
from ..mesonlib import (
File, MachineChoice, MesonException, OrderedSet, OptionOverrideProxy,
classify_unity_sources, unholder
@ -451,8 +452,7 @@ class Backend:
def get_external_rpath_dirs(self, target):
dirs = set()
args = []
# FIXME: is there a better way?
for lang in ['c', 'cpp']:
for lang in languages_using_ldflags:
try:
args.extend(self.environment.coredata.get_external_link_args(target.for_machine, lang))
except Exception:

@ -126,6 +126,7 @@ from .compilers import (
is_library,
is_known_suffix,
lang_suffixes,
languages_using_ldflags,
sort_clink,
)
from .c import (

Loading…
Cancel
Save