Beispiel #1
0
    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)
Beispiel #2
0
    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 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):
        """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)
Beispiel #6
0
    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)