Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions numpy/distutils/fcompiler/gnu.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,20 @@ def get_flags_arch(self):
return []

def runtime_library_dir_option(self, dir):
if sys.platform[:3] == 'aix' or sys.platform == 'win32':
# Linux/Solaris/Unix support RPATH, Windows and AIX do not
if sys.platform == 'win32':
# Linux/Solaris/Unix support RPATH, Windows does not
raise NotImplementedError

# TODO: could use -Xlinker here, if it's supported
assert "," not in dir

sep = ',' if sys.platform == 'darwin' else '='
return '-Wl,-rpath%s%s' % (sep, dir)
if sys.platform == 'darwin':
return f'-Wl,-rpath,{dir}'
elif sys.platform[:3] == 'aix':
# AIX RPATH is called LIBPATH
return f'-Wl,-blibpath:{dir}'
else:
return f'-Wl,-rpath={dir}'


class Gnu95FCompiler(GnuFCompiler):
Expand Down