diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-11 22:07:29 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-14 22:41:24 +0300 |
commit | 7c37ca15f38dce30eeef6cd8bc53f25406f9029e (patch) | |
tree | 51262992752ec77d82284ef56c4fa8ad594e6981 /mesonbuild/scripts/depfixer.py | |
parent | 2a70327f1d27ef228621e75b7e38354c11df860e (diff) | |
download | meson-7c37ca15f38dce30eeef6cd8bc53f25406f9029e.zip meson-7c37ca15f38dce30eeef6cd8bc53f25406f9029e.tar.gz meson-7c37ca15f38dce30eeef6cd8bc53f25406f9029e.tar.bz2 |
🤦🤦🤦
Diffstat (limited to 'mesonbuild/scripts/depfixer.py')
-rw-r--r-- | mesonbuild/scripts/depfixer.py | 9 |
1 files changed, 8 insertions, 1 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]) |