(self, verbose=0, dry_run=0, force=0)
| 158 | compiler_type = 'mingw32' |
| 159 | |
| 160 | def __init__(self, verbose=0, dry_run=0, force=0): |
| 161 | |
| 162 | CygwinCCompiler.__init__ (self, verbose, dry_run, force) |
| 163 | |
| 164 | # ld_version >= "2.13" support -shared so use it instead of |
| 165 | # -mdll -static |
| 166 | if self.ld_version >= "2.13": |
| 167 | shared_option = "-shared" |
| 168 | else: |
| 169 | shared_option = "-mdll -static" |
| 170 | |
| 171 | # A real mingw32 doesn't need to specify a different entry point, |
| 172 | # but cygwin 2.91.57 in no-cygwin-mode needs it. |
| 173 | if self.gcc_version <= "2.91.57": |
| 174 | entry_point = '--entry _DllMain@12' |
| 175 | else: |
| 176 | entry_point = '' |
| 177 | |
| 178 | if is_cygwingcc(): |
| 179 | raise CCompilerError( |
| 180 | 'Cygwin gcc cannot be used with --compiler=mingw32') |
| 181 | |
| 182 | self.set_executables(compiler='gcc -O -Wall', |
| 183 | compiler_so='gcc -mdll -O -Wall', |
| 184 | compiler_cxx='g++ -O -Wall', |
| 185 | linker_exe='gcc', |
| 186 | linker_so='%s %s %s' |
| 187 | % (self.linker_dll, shared_option, |
| 188 | entry_point)) |
| 189 | # Maybe we should also append -mthreads, but then the finished |
| 190 | # dlls need another dll (mingwm10.dll see Mingw32 docs) |
| 191 | # (-mthreads: Support thread-safe exception handling on `Mingw32') |
| 192 | |
| 193 | # no additional libraries needed |
| 194 | self.dll_libraries=[] |
| 195 | |
| 196 | # Include the appropriate MSVC runtime library if Python was built |
| 197 | # with MSVC 7.0 or later. |
| 198 | self.dll_libraries = get_msvcr() |
| 199 | |
| 200 | # Because these compilers aren't configured in Python's pyconfig.h file by |
| 201 | # default, we should at least warn the user if he is using an unmodified |
nothing calls this directly
no test coverage detected