From 2269b7f60b2443aa697a5616fcc3692fa3496046 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 15 Jul 2017 05:33:03 -0400 Subject: Add build_rpath as new property allowing people to specify rpath entries that are used in the build tree but will be removed on install. --- mesonbuild/compilers/compilers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/compilers.py') diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 0be3908..c88286c 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -798,8 +798,8 @@ class Compiler: def get_instruction_set_args(self, instruction_set): return None - def build_unix_rpath_args(self, build_dir, from_dir, rpath_paths, install_rpath): - if not rpath_paths and not install_rpath: + def build_unix_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath): + if not rpath_paths and not install_rpath and not build_rpath: return [] # The rpaths we write must be relative, because otherwise # they have different length depending on the build @@ -812,6 +812,9 @@ class Compiler: relative = os.path.relpath(os.path.join(build_dir, p), os.path.join(build_dir, from_dir)) rel_rpaths.append(relative) paths = ':'.join([os.path.join('$ORIGIN', p) for p in rel_rpaths]) + # Build_rpath is used as-is (it is usually absolute). + if build_rpath != '': + paths += ':' + build_rpath if len(paths) < len(install_rpath): padding = 'X' * (len(install_rpath) - len(paths)) if not paths: -- cgit v1.1