aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-04-11 22:07:29 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-04-14 22:41:24 +0300
commit7c37ca15f38dce30eeef6cd8bc53f25406f9029e (patch)
tree51262992752ec77d82284ef56c4fa8ad594e6981 /mesonbuild
parent2a70327f1d27ef228621e75b7e38354c11df860e (diff)
downloadmeson-7c37ca15f38dce30eeef6cd8bc53f25406f9029e.zip
meson-7c37ca15f38dce30eeef6cd8bc53f25406f9029e.tar.gz
meson-7c37ca15f38dce30eeef6cd8bc53f25406f9029e.tar.bz2
🤦🤦🤦
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/scripts/depfixer.py9
-rw-r--r--mesonbuild/scripts/meson_install.py8
2 files changed, 9 insertions, 8 deletions
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
index 5c1216c..41ede1d 100644
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -351,6 +351,7 @@ def get_darwin_rpaths_to_remove(fname):
result = []
current_cmd = 'FOOBAR'
for line in out.split('\n'):
+ line = line.strip()
if ' ' not in line:
continue
key, value = line.strip().split(' ', 1)
@@ -363,7 +364,13 @@ def get_darwin_rpaths_to_remove(fname):
def fix_darwin(fname, new_rpath):
try:
- for rp in get_darwin_rpaths_to_remove(fname):
+ rpaths = get_darwin_rpaths_to_remove(fname)
+ except subprocess.CalledProcessError:
+ # Otool failed, which happens when invoked on a
+ # non-executable target. Just return.
+ return
+ try:
+ for rp in rpaths:
subprocess.check_call(['install_name_tool', '-delete_rpath', rp, fname])
if new_rpath != '':
subprocess.check_call(['install_name_tool', '-add_rpath', new_rpath, fname])
diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py
index 6fa3d0d..013f2a0 100644
--- a/mesonbuild/scripts/meson_install.py
+++ b/mesonbuild/scripts/meson_install.py
@@ -291,12 +291,6 @@ def run_install_script(d):
print('Failed to run install script {!r}'.format(name))
sys.exit(1)
-def is_elf_platform():
- platname = platform.system().lower()
- if platname == 'darwin' or platname == 'windows' or platname == 'cygwin':
- return False
- return True
-
def check_for_stampfile(fname):
'''Some languages e.g. Rust have output files
whose names are not known at configure time.
@@ -372,7 +366,7 @@ def install_targets(d):
print("Symlink creation does not work on this platform. "
"Skipping all symlinking.")
printed_symlink_error = True
- if is_elf_platform() and os.path.isfile(outname):
+ if os.path.isfile(outname):
try:
depfixer.fix_rpath(outname, install_rpath, False)
except SystemExit as e: