aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-04-29 20:45:46 +0300
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-05-01 12:10:25 +0000
commitd3ff7d44abbf8246c2bea6ca5ef930a22d07de7f (patch)
tree3aabc57457840d0d26382917c8af9aad2aded5c1 /mesonbuild
parent24f1b96dde9a0faf961a421f63212d5245de12c0 (diff)
downloadmeson-d3ff7d44abbf8246c2bea6ca5ef930a22d07de7f.zip
meson-d3ff7d44abbf8246c2bea6ca5ef930a22d07de7f.tar.gz
meson-d3ff7d44abbf8246c2bea6ca5ef930a22d07de7f.tar.bz2
Made depfixer more robust on OSX. Closes #3493.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/scripts/depfixer.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
index 41ede1d..185c76a 100644
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -347,7 +347,9 @@ def fix_elf(fname, new_rpath, verbose=True):
e.fix_rpath(new_rpath)
def get_darwin_rpaths_to_remove(fname):
- out = subprocess.check_output(['otool', '-l', fname], universal_newlines=True)
+ out = subprocess.check_output(['otool', '-l', fname],
+ universal_newlines=True,
+ stderr=subprocess.DEVNULL)
result = []
current_cmd = 'FOOBAR'
for line in out.split('\n'):
@@ -371,9 +373,13 @@ def fix_darwin(fname, new_rpath):
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])
+ subprocess.check_call(['install_name_tool', '-delete_rpath', rp, fname],
+ stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL)
+ if new_rpath:
+ subprocess.check_call(['install_name_tool', '-add_rpath', new_rpath, fname],
+ stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL)
except Exception as e:
raise
sys.exit(0)