From ea79e9496438abe2d1d4ad957cc8bd9324f3d24f Mon Sep 17 00:00:00 2001 From: Hemmo Nieminen Date: Tue, 20 Jun 2017 21:34:28 +0300 Subject: 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. --- mesonbuild/compilers/compilers.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mesonbuild/compilers/compilers.py') 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: -- cgit v1.1