aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-07-21 22:19:07 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-07-21 22:19:07 +0300
commitbff37a90fc475c6204087dcf1ccb6734b990141e (patch)
treed228c8107a4daf66e76f3d0fa4a03e5e689c55e9 /mesonbuild/compilers/compilers.py
parent328a1f30fdfdadc6d5df4ebfc075e9cd5c0df96e (diff)
parente82edc179fe86e68d1f74fe084fd891ef2d12316 (diff)
downloadmeson-bff37a90fc475c6204087dcf1ccb6734b990141e.zip
meson-bff37a90fc475c6204087dcf1ccb6734b990141e.tar.gz
meson-bff37a90fc475c6204087dcf1ccb6734b990141e.tar.bz2
Merged buildrpath branch.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 252db72..72e1ed3 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: