From b85e0db2cc660740d012a2f59f6508ced26eb43a Mon Sep 17 00:00:00 2001 From: Lukas Stadler <lukas.stadler@oracle.com> Date: Wed, 4 Oct 2017 16:00:04 +0200 Subject: [PATCH] handle symlinks in copylib --- mx.fastr/mx_copylib.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mx.fastr/mx_copylib.py b/mx.fastr/mx_copylib.py index b2c337717b..6bdb3d015b 100644 --- a/mx.fastr/mx_copylib.py +++ b/mx.fastr/mx_copylib.py @@ -118,8 +118,15 @@ def copylib(args): if os.path.exists(os.path.join(path, plain_libpath_base)): f = plain_libpath_base target_dir = args[1] + target = os.path.join(path, f) if not os.path.exists(os.path.join(target_dir, f)): - _copylib(args[0], os.path.join(path, f), plain_libpath_base, args[1]) + if os.path.islink(target): + link_target = os.path.join(path, os.readlink(target)) + if link_target == '/usr/lib/libSystem.B.dylib': + # simply copy over the link to the system library + os.symlink(link_target, os.path.join(target_dir, plain_libpath_base)) + return 0 + _copylib(args[0], target, plain_libpath_base, args[1]) return 0 if os.environ.has_key('FASTR_RELEASE'): -- GitLab