MCPcopy Create free account
hub / github.com/numpy/numpy / get_flags_linker_so

Method get_flags_linker_so

numpy/distutils/fcompiler/ibm.py:65–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 return ['-g']
64
65 def get_flags_linker_so(self):
66 opt = []
67 if sys.platform=='darwin':
68 opt.append('-Wl,-bundle,-flat_namespace,-undefined,suppress')
69 else:
70 opt.append('-bshared')
71 version = self.get_version(ok_status=[0, 40])
72 if version is not None:
73 if sys.platform.startswith('aix'):
74 xlf_cfg = '/etc/xlf.cfg'
75 else:
76 xlf_cfg = '/etc/opt/ibmcmp/xlf/%s/xlf.cfg' % version
77 fo, new_cfg = make_temp_file(suffix='_xlf.cfg')
78 log.info('Creating '+new_cfg)
79 with open(xlf_cfg) as fi:
80 crt1_match = re.compile(r'\s*crt\s*=\s*(?P<path>.*)/crt1.o').match
81 for line in fi:
82 m = crt1_match(line)
83 if m:
84 fo.write('crt = %s/bundle1.o\n' % (m.group('path')))
85 else:
86 fo.write(line)
87 fo.close()
88 opt.append('-F'+new_cfg)
89 return opt
90
91 def get_flags_opt(self):
92 return ['-O3']

Callers

nothing calls this directly

Calls 8

get_versionMethod · 0.95
make_temp_fileFunction · 0.90
openFunction · 0.85
startswithMethod · 0.80
infoMethod · 0.80
compileMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected