diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/build.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/compilers.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 7757300..4a35bec 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1776,7 +1776,7 @@ class CustomTargetIndex: def __repr__(self): return '<CustomTargetIndex: {!r}[{}]>'.format( - self.target, self.target.output.index(self.output)) + self.target, self.target.get_outputs().index(self.output)) def get_outputs(self): return [self.output] diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 3d50eb0..24ae3c9 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -863,7 +863,12 @@ class Compiler: # Not needed on Windows or other platforms that don't use RPATH # https://github.com/mesonbuild/meson/issues/1897 lpaths = ':'.join([os.path.join(build_dir, p) for p in rpath_paths]) - args += ['-Wl,-rpath-link,' + lpaths] + + # clang expands '-Wl,rpath-link,' to ['-rpath-link'] instead of ['-rpath-link',''] + # This eats the next argument, which happens to be 'ldstdc++', causing link failures. + # We can dodge this problem by not adding any rpath_paths if the argument is empty. + if lpaths.strip() != '': + args += ['-Wl,-rpath-link,' + lpaths] return args |