| 52 | return ['-shared', '-Wl,-expect_unresolved,*'] |
| 53 | |
| 54 | class CompaqVisualFCompiler(FCompiler): |
| 55 | |
| 56 | compiler_type = 'compaqv' |
| 57 | description = 'DIGITAL or Compaq Visual Fortran Compiler' |
| 58 | version_pattern = (r'(DIGITAL|Compaq) Visual Fortran Optimizing Compiler' |
| 59 | r' Version (?P<version>[^\s]*).*') |
| 60 | |
| 61 | compile_switch = '/compile_only' |
| 62 | object_switch = '/object:' |
| 63 | library_switch = '/OUT:' #No space after /OUT:! |
| 64 | |
| 65 | static_lib_extension = ".lib" |
| 66 | static_lib_format = "%s%s" |
| 67 | module_dir_switch = '/module:' |
| 68 | module_include_switch = '/I' |
| 69 | |
| 70 | ar_exe = 'lib.exe' |
| 71 | fc_exe = 'DF' |
| 72 | |
| 73 | if sys.platform=='win32': |
| 74 | from numpy.distutils.msvccompiler import MSVCCompiler |
| 75 | |
| 76 | try: |
| 77 | m = MSVCCompiler() |
| 78 | m.initialize() |
| 79 | ar_exe = m.lib |
| 80 | except DistutilsPlatformError: |
| 81 | pass |
| 82 | except AttributeError as e: |
| 83 | if '_MSVCCompiler__root' in str(e): |
| 84 | print('Ignoring "%s" (I think it is msvccompiler.py bug)' % (e)) |
| 85 | else: |
| 86 | raise |
| 87 | except OSError as e: |
| 88 | if not "vcvarsall.bat" in str(e): |
| 89 | print("Unexpected OSError in", __file__) |
| 90 | raise |
| 91 | except ValueError as e: |
| 92 | if not "'path'" in str(e): |
| 93 | print("Unexpected ValueError in", __file__) |
| 94 | raise |
| 95 | |
| 96 | executables = { |
| 97 | 'version_cmd' : ['<F90>', "/what"], |
| 98 | 'compiler_f77' : [fc_exe, "/f77rtl", "/fixed"], |
| 99 | 'compiler_fix' : [fc_exe, "/fixed"], |
| 100 | 'compiler_f90' : [fc_exe], |
| 101 | 'linker_so' : ['<F90>'], |
| 102 | 'archiver' : [ar_exe, "/OUT:"], |
| 103 | 'ranlib' : None |
| 104 | } |
| 105 | |
| 106 | def get_flags(self): |
| 107 | return ['/nologo', '/MD', '/WX', '/iface=(cref,nomixed_str_len_arg)', |
| 108 | '/names:lowercase', '/assume:underscore'] |
| 109 | def get_flags_opt(self): |
| 110 | return ['/Ox', '/fast', '/optimize:5', '/unroll:0', '/math_library:fast'] |
| 111 | def get_flags_arch(self): |
nothing calls this directly
no test coverage detected