|
|
@ -860,6 +860,11 @@ class Compiler: |
|
|
|
# Not needed on Windows or other platforms that don't use RPATH |
|
|
|
# Not needed on Windows or other platforms that don't use RPATH |
|
|
|
# https://github.com/mesonbuild/meson/issues/1897 |
|
|
|
# https://github.com/mesonbuild/meson/issues/1897 |
|
|
|
lpaths = ':'.join([os.path.join(build_dir, p) for p in rpath_paths]) |
|
|
|
lpaths = ':'.join([os.path.join(build_dir, p) for p in rpath_paths]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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] |
|
|
|
args += ['-Wl,-rpath-link,'+lpaths] |
|
|
|
return args |
|
|
|
return args |
|
|
|
|
|
|
|
|
|
|
|