Return a list of -arch flags for every supported architecture.
(self, cmd)
| 314 | g2c = 'gfortran' |
| 315 | |
| 316 | def _universal_flags(self, cmd): |
| 317 | """Return a list of -arch flags for every supported architecture.""" |
| 318 | if not sys.platform == 'darwin': |
| 319 | return [] |
| 320 | arch_flags = [] |
| 321 | # get arches the C compiler gets. |
| 322 | c_archs = self._c_arch_flags() |
| 323 | if "i386" in c_archs: |
| 324 | c_archs[c_archs.index("i386")] = "i686" |
| 325 | # check the arches the Fortran compiler supports, and compare with |
| 326 | # arch flags from C compiler |
| 327 | for arch in ["ppc", "i686", "x86_64", "ppc64", "s390x"]: |
| 328 | if _can_target(cmd, arch) and arch in c_archs: |
| 329 | arch_flags.extend(["-arch", arch]) |
| 330 | return arch_flags |
| 331 | |
| 332 | def get_flags(self): |
| 333 | flags = GnuFCompiler.get_flags(self) |
no test coverage detected