aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-06-10 14:11:55 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-06-10 14:11:55 +0530
commit56462e1439d9dc0730fdb3f2acc619d7c8e484bd (patch)
tree6b2fc02ae8715b46e67ac6b36307db018add9bfc
parent22cfd44221ada3219d9096e15dc8b00d32e0f9f6 (diff)
downloadmeson-56462e1439d9dc0730fdb3f2acc619d7c8e484bd.zip
meson-56462e1439d9dc0730fdb3f2acc619d7c8e484bd.tar.gz
meson-56462e1439d9dc0730fdb3f2acc619d7c8e484bd.tar.bz2
compilers: Fix build_unix_rpath_args indentation
No code changes
-rw-r--r--mesonbuild/compilers.py58
1 files changed, 29 insertions, 29 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index c9cfb46..88f9c22 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -731,35 +731,35 @@ class Compiler:
raise EnvironmentException('Language %s does not support linking whole archives.' % self.language)
def build_unix_rpath_args(self, build_dir, from_dir, rpath_paths, install_rpath):
- if not rpath_paths and not install_rpath:
- return []
- # The rpaths we write must be relative, because otherwise
- # they have different length depending on the build
- # directory. This breaks reproducible builds.
- rel_rpaths = []
- for p in rpath_paths:
- if p == from_dir:
- relative = '' # relpath errors out in this case
- else:
- relative = os.path.relpath(p, from_dir)
- rel_rpaths.append(relative)
- paths = ':'.join([os.path.join('$ORIGIN', p) for p in rel_rpaths])
- if len(paths) < len(install_rpath):
- padding = 'X' * (len(install_rpath) - len(paths))
- if not paths:
- paths = padding
- else:
- paths = paths + ':' + padding
- args = ['-Wl,-rpath,' + paths]
- if get_compiler_is_linuxlike(self):
- # Rpaths to use while linking must be absolute. These are not
- # written to the binary. Needed only with GNU ld:
- # https://sourceware.org/bugzilla/show_bug.cgi?id=16936
- # Not needed on Windows or other platforms that don't use RPATH
- # https://github.com/mesonbuild/meson/issues/1897
- lpaths = ':'.join([os.path.join(build_dir, p) for p in rpath_paths])
- args += ['-Wl,-rpath-link,' + lpaths]
- return args
+ if not rpath_paths and not install_rpath:
+ return []
+ # The rpaths we write must be relative, because otherwise
+ # they have different length depending on the build
+ # directory. This breaks reproducible builds.
+ rel_rpaths = []
+ for p in rpath_paths:
+ if p == from_dir:
+ relative = '' # relpath errors out in this case
+ else:
+ relative = os.path.relpath(p, from_dir)
+ rel_rpaths.append(relative)
+ paths = ':'.join([os.path.join('$ORIGIN', p) for p in rel_rpaths])
+ if len(paths) < len(install_rpath):
+ padding = 'X' * (len(install_rpath) - len(paths))
+ if not paths:
+ paths = padding
+ else:
+ paths = paths + ':' + padding
+ args = ['-Wl,-rpath,' + paths]
+ if get_compiler_is_linuxlike(self):
+ # Rpaths to use while linking must be absolute. These are not
+ # written to the binary. Needed only with GNU ld:
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=16936
+ # Not needed on Windows or other platforms that don't use RPATH
+ # https://github.com/mesonbuild/meson/issues/1897
+ lpaths = ':'.join([os.path.join(build_dir, p) for p in rpath_paths])
+ args += ['-Wl,-rpath-link,' + lpaths]
+ return args
class CCompiler(Compiler):
def __init__(self, exelist, version, is_cross, exe_wrapper=None):