aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/d.py
diff options
context:
space:
mode:
authorDan Kegel <dank@kegel.com>2020-05-07 10:15:06 -0700
committerDan Kegel <dank@kegel.com>2020-05-16 20:25:58 +0000
commitd7235c5905fa98207d90f3ad34bf590493498d5b (patch)
treec93233a31beaefd89fdd9c18e4e566c7918a2b1e /mesonbuild/compilers/d.py
parentefb86088bcf8960db440eadcd11c0e073c80ab52 (diff)
downloadmeson-d7235c5905fa98207d90f3ad34bf590493498d5b.zip
meson-d7235c5905fa98207d90f3ad34bf590493498d5b.tar.gz
meson-d7235c5905fa98207d90f3ad34bf590493498d5b.tar.bz2
Let .pc files specify rpath.
Fixes #4027
Diffstat (limited to 'mesonbuild/compilers/d.py')
-rw-r--r--mesonbuild/compilers/d.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index a83e221..e7bd280 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -220,7 +220,7 @@ class DmdLikeCompilerMixin:
def build_rpath_args(self, env, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
if self.info.is_windows():
- return []
+ return ([], set())
# GNU ld, solaris ld, and lld acting like GNU ld
if self.linker.id.startswith('ld'):
@@ -228,15 +228,16 @@ class DmdLikeCompilerMixin:
# do directly, each argument -rpath and the value to rpath, need to be
# split into two separate arguments both prefaced with the -L=.
args = []
- for r in super().build_rpath_args(
- env, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
+ (rpath_args, rpath_dirs_to_remove) = super().build_rpath_args(
+ env, build_dir, from_dir, rpath_paths, build_rpath, install_rpath)
+ for r in rpath_args:
if ',' in r:
a, b = r.split(',', maxsplit=1)
args.append(a)
args.append(self.LINKER_PREFIX + b)
else:
args.append(r)
- return args
+ return (args, rpath_dirs_to_remove)
return super().build_rpath_args(
env, build_dir, from_dir, rpath_paths, build_rpath, install_rpath)