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.
pull/1926/head
Hemmo Nieminen 8 years ago
parent 7ab774dee5
commit ea79e94964
  1. 4
      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:

Loading…
Cancel
Save