class_docstr: Abstract base class to define the interface that must be implemented
  by real Fortran compiler classes.
  
  Methods that subclasses may redefine:
  
      update_executables(), find_executables(), get_version()
      get_flags(), get_flags_opt(), get_flags_arch(), get_flags_debug()
      get_flags_f77(), get_flags_opt_f77(), get_flags_arch_f77(),
      get_flags_debug_f77(), get_flags_f90(), get_flags_opt_f90(),
      get_flags_arch_f90(), get_flags_debug_f90(),
      get_flags_fix(), get_flags_linker_so()
  
  DON'T call these methods (except get_version) after
  constructing a compiler instance or inside any other method.
  All methods, except update_executables() and find_executables(),
  may call the get_version() method.
  
  After constructing a compiler instance, always call customize(dist=None)
  method that finalizes compiler construction and makes the following
  attributes available:
    compiler_f77
    compiler_f90
    compiler_fix
    linker_so
    archiver
    ranlib
    libraries
    library_dirs
class_docstr_tok: ["Abstract","base","class","to","define","the","interface","that","must","be","implemented","by","real","Fortran","compiler","classes",".","Methods","that","subclasses","may","redefine",":","update_executables","(",")",",","find_executables","(",")",",","get_version","(",")","get_flags","(",")",",","get_flags_opt","(",")",",","get_flags_arch","(",")",",","get_flags_debug","(",")","get_flags_f77","(",")",",","get_flags_opt_f77","(",")",",","get_flags_arch_f77","(",")",",","get_flags_debug_f77","(",")",",","get_flags_f90","(",")",",","get_flags_opt_f90","(",")",",","get_flags_arch_f90","(",")",",","get_flags_debug_f90","(",")",",","get_flags_fix","(",")",",","get_flags_linker_so","(",")","DO","N'T","call","these","methods","(","except","get_version",")","after","constructing","a","compiler","instance","or","inside","any","other","method",".","All","methods",",","except","update_executables","(",")","and","find_executables","(",")",",","may","call","the","get_version","(",")","method",".","After","constructing","a","compiler","instance",",","always","call","customize","(","dist=None",")","method","that","finalizes","compiler","construction","and","makes","the","following","attributes","available",":","compiler_f77","compiler_f90","compiler_fix","linker_so","archiver","ranlib","libraries","library_dirs"]
code: 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,
  ):
      objects, output_dir = self._fix_object_args(objects, output_dir)
      (
          libraries,
          library_dirs,
          runtime_library_dirs,
      ) = self._fix_lib_args(
          libraries, library_dirs, runtime_library_dirs
      )
  
      lib_opts = gen_lib_options(
          self, library_dirs, runtime_library_dirs, libraries
      )
      if is_string(output_dir):
          output_filename = os.path.join(output_dir, output_filename)
      elif output_dir is not None:
          raise TypeError("'output_dir' must be a string or None")
  
      if self._need_link(objects, output_filename):
          if self.library_switch[-1] == " ":
              o_args = [self.library_switch.strip(), output_filename]
          else:
              o_args = [self.library_switch.strip() + output_filename]
  
          if is_string(self.objects):
              ld_args = objects + [self.objects]
          else:
              ld_args = objects + self.objects
          ld_args = ld_args + lib_opts + o_args
          if debug:
              ld_args[:0] = ["-g"]
          if extra_preargs:
              ld_args[:0] = extra_preargs
          if extra_postargs:
              ld_args.extend(extra_postargs)
          self.mkpath(os.path.dirname(output_filename))
          if target_desc == CCompiler.EXECUTABLE:
              linker = self.linker_exe[:]
          else:
              linker = self.linker_so[:]
          command = linker + ld_args
          try:
              self.spawn(command)
          except DistutilsExecError:
              msg = str(get_exception())
              raise LinkError(msg)
      else:
          log.debug("skipping %s (up-to-date)", output_filename)
  
imports: from __future__ import division, absolute_import, print_function
  import os
  import sys
  import re
  import types
  from numpy.compat import open_latin1
  from distutils.sysconfig import get_python_lib
  from distutils.fancy_getopt import FancyGetopt
  from distutils.errors import DistutilsModuleError, DistutilsExecError, CompileError, LinkError, DistutilsPlatformError
  from distutils.util import split_quoted, strtobool
  from numpy.distutils.ccompiler import CCompiler, gen_lib_options
  from numpy.distutils import log
  from numpy.distutils.misc_util import is_string, all_strings, is_sequence, make_temp_file, get_shared_lib_extension
  from numpy.distutils.exec_command import find_executable
  from numpy.distutils.compat import get_exception
  from numpy.distutils import _shell_utils
  from .environment import EnvironmentConfig
label_desc: Use image node_id 31 for calling the FCompiler obj's underlying member method code with example usage: obj.link(target_desc, objects, output_filename, output_dir, libraries, library_dirs, runtime_library_dirs, export_symbols, debug, extra_preargs, extra_postargs, build_temp, target_lang) without return types