Skip to content

Commit

Permalink
Fix remaining soname and rpath issues on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
GoaLitiuM committed Sep 6, 2018
1 parent fd4c996 commit 040dd03
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions mesonbuild/compilers/d.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,15 @@ def get_std_shared_lib_link_args(self):

def get_soname_args(self, *args):
# FIXME: Make this work for cross-compiling
gcc_type = GCC_STANDARD
if is_windows():
gcc_type = GCC_CYGWIN
if is_osx():
gcc_type = GCC_OSX
return get_gcc_soname_args(gcc_type, *args)
return []
elif is_osx():
soname_args = get_gcc_soname_args(GCC_OSX, *args)
if soname_args:
return ['-Wl,' + ','.join(soname_args)]
return []

return get_gcc_soname_args(GCC_STANDARD, *args)

def get_feature_args(self, kwargs, build_to_src):
res = []
Expand Down Expand Up @@ -230,7 +233,7 @@ def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, instal
paths = padding
else:
paths = paths + ':' + padding
return ['-Wl,-rpath={}'.format(paths)]
return ['-Wl,-rpath,{}'.format(paths)]

def _get_compiler_check_args(self, env, extra_args, dependencies, mode='compile'):
if extra_args is None:
Expand Down

0 comments on commit 040dd03

Please sign in to comment.