def set_executables(self, **args): """Has no linker subsystem option for shared libraries""" Mingw32CCompiler.set_executables(self, **args) try: self.linker_so = difference(self.linker_so, subsystem_options) except TypeError: pass
def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): """Do a Win32 GUI link if no subsystem option given.""" if (target_desc != self.EXECUTABLE and not intersect(subsystem_options, extra_preargs) and not intersect(subsystem_options, extra_postargs)): try: extra_preargs = extra_preargs + subsystem_options[0] except TypeError: extra_preargs = subsystem_options[0:1] Mingw32CCompiler.link(self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): """Do a console link.""" if target_desc != self.EXECUTABLE: try: extra_preargs = difference(extra_preargs, subsystem_options) except TypeError: pass try: extra_postargs = difference(extra_postargs, subsystem_options) except TypeError: pass Mingw32CCompiler.link(self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): # for some reason, this is being set to 'cc', which is wrong self.compiler_cxx = ['gcc', '-mno-cygwin'] # make sure gcc is being used self.check_for_gcc('_link') if re.search(r'c\+\+', target_lang, re.I): # stdc++ isn't being included since platform != posix if 'stdc++' not in libraries: libraries.append('stdc++') Mingw32CCompiler.link(self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
def set_executables (self, **args): """Has no linker subsystem option for shared libraries""" Mingw32CCompiler.set_executables(self, **args) try: self.linker_so = difference (self.linker_so, subsystem_options) except TypeError: pass
def __init__(self, verbose=0, dry_run=0, force=0): from distutils import version import sys StrictVersion = version.StrictVersion if sys.version_info < (2, 5): version.StrictVersion = version.LooseVersion Mingw32CCompiler.__init__(self, verbose, dry_run, force) version.StrictVersion = StrictVersion
def set_executables(self, **args): """Has console subsystem linker option for shared libraries.""" Mingw32CCompiler.set_executables(self, **args) try: linker_so = difference(self.linker_so, subsystem_options) except TypeError: linker_so = subsystem_options[1:2] else: linker_so.append(subsystem_options[1]) self.linker_so = linker_so
def set_executables (self, **args): """Has console subsystem linker option for shared libraries.""" Mingw32CCompiler.set_executables(self, **args) try: linker_so = difference(self.linker_so, subsystem_options) except TypeError: linker_so = subsystem_options[1:2] else: linker_so.append(subsystem_options[1]) self.linker_so = linker_so
def __init__ (self, verbose=0, dry_run=0, force=0): from distutils import version import sys StrictVersion = version.StrictVersion if sys.version_info < (2,5): version.StrictVersion = version.LooseVersion Mingw32CCompiler.__init__ (self, verbose, dry_run, force) version.StrictVersion = StrictVersion
def link (self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): """Do a console link.""" if target_desc != self.EXECUTABLE: try: extra_preargs = difference(extra_preargs, subsystem_options) except TypeError: pass try: extra_postargs = difference(extra_postargs, subsystem_options) except TypeError: pass Mingw32CCompiler.link (self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
def __init__(self, verbose=0, dry_run=0, force=0): _Mingw32CCompiler.__init__(self, verbose=0, dry_run=0, force=0) # ld_version >= "2.13" support -shared so use it instead of # -mdll -static if self.ld_version >= "2.13": shared_option = "-shared" else: shared_option = "-mdll -static" # A real mingw32 doesn't need to specify a different entry point, # but cygwin 2.91.57 in no-cygwin-mode needs it. if self.gcc_version <= "2.91.57": entry_point = '--entry _DllMain@12' else: entry_point = '' self.set_executables(compiler='gcc -O -mms-bitfields -Wall', compiler_so='gcc -mms-bitfields -mdll -O -Wall', compiler_cxx='g++ -mms-bitfields -O -Wall', linker_exe='gcc', linker_so='%s %s %s' % (self.linker_dll, shared_option, entry_point))
def link (self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): """Do a Win32 GUI link if no subsystem option given.""" if (target_desc != self.EXECUTABLE and not intersect(subsystem_options, extra_preargs) and not intersect(subsystem_options, extra_postargs)): try: extra_preargs = extra_preargs + subsystem_options[0] except TypeError: extra_preargs = subsystem_options[0:1] Mingw32CCompiler.link (self, target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang)
def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): # use separate copies, so we can modify the lists extra_preargs = copy.copy(extra_preargs or []) (dll_name, dll_extension) = os.path.splitext(output_filename) if dll_extension.lower() == ".dll": extra_preargs.extend(["-Wl,--out-implib,%s" %(os.path.join(os.path.dirname(dll_name), "jcc", "jcc.lib"))]) Mingw32CCompiler.link(self, target_desc=target_desc, objects=objects, output_filename=output_filename, output_dir=output_dir, libraries=libraries, library_dirs=library_dirs, runtime_library_dirs=runtime_library_dirs, export_symbols=export_symbols, debug=debug, extra_preargs=extra_preargs, extra_postargs=extra_postargs, build_temp=build_temp, target_lang=target_lang)
def __init__(self, verbose=0, dry_run=0, force=0): Mingw32CCompiler.__init__(self, verbose, dry_run, force) # undo following line: # http://hg.python.org/cpython/file/3a1db0d2747e/Lib/distutils/cygwinccompiler.py#l343 self.dll_libraries = []
def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): # make sure gcc is being used self.check_for_gcc('_compile') Mingw32CCompiler._compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts)
def __init__(self, verbose=0, dry_run=0, force=0): Mingw32CCompiler.__init__(self, verbose, dry_run, force)