diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-15 05:33:03 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-21 19:40:54 +0300 |
commit | 2269b7f60b2443aa697a5616fcc3692fa3496046 (patch) | |
tree | 085e2a1b2dd75a46f0d5d837d8d039f93656ed83 /mesonbuild/compilers/compilers.py | |
parent | 381e8313ed191ae8e440a9ba3805d5322c769ea7 (diff) | |
download | meson-2269b7f60b2443aa697a5616fcc3692fa3496046.zip meson-2269b7f60b2443aa697a5616fcc3692fa3496046.tar.gz meson-2269b7f60b2443aa697a5616fcc3692fa3496046.tar.bz2 |
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.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 7 |
1 files changed, 5 insertions, 2 deletions
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: |