🤦🤦🤦

pull/3410/merge
Jussi Pakkanen 7 years ago
parent 2a70327f1d
commit 7c37ca15f3
  1. 9
      mesonbuild/scripts/depfixer.py
  2. 8
      mesonbuild/scripts/meson_install.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])

@ -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:

Loading…
Cancel
Save