aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2017-06-20 21:34:28 +0300
committerNirbheek Chauhan <nirbheek@centricular.com>2017-07-04 13:00:35 +0530
commit1be77026373469ce4d71650adbba236df031a9f4 (patch)
tree3cc459c42e6a56fc465e53b2c78b78d64d0b1b84
parentcf83f0cec525954ed64480edc6690ffb43c8045b (diff)
downloadmeson-1be77026373469ce4d71650adbba236df031a9f4.zip
meson-1be77026373469ce4d71650adbba236df031a9f4.tar.gz
meson-1be77026373469ce4d71650adbba236df031a9f4.tar.bz2
Fix a missing path issue causing Python traceback.
A path was missing from a call to os.path.relpath when handling rpaths. Fix this by assuming empty target directory means build root.
-rw-r--r--mesonbuild/compilers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 3b9972f..925aca1 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -762,6 +762,10 @@ class Compiler:
# directory. This breaks reproducible builds.
rel_rpaths = []
for p in rpath_paths:
+ # p can be an empty string for build_dir (relative path), but
+ # os.path.relpath() below won't like that.
+ if p == '':
+ p = build_dir
if p == from_dir:
relative = '' # relpath errors out in this case
else: