aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 579988f..6b5c4a4 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -763,6 +763,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: