class documentation

class Mingw32CCompiler(CygwinCCompiler): (source)

View In Hierarchy

Handles the Mingw32 port of the GNU C compiler to Windows.

Method __init__ Undocumented
Method runtime_library_dir_option Return the compiler option to add 'dir' to the list of directories searched for runtime libraries.
Class Variable compiler_type Undocumented

Inherited from CygwinCCompiler:

Method link Link the objects.
Class Variable dylib_lib_extension Undocumented
Class Variable dylib_lib_format Undocumented
Class Variable exe_extension Undocumented
Class Variable obj_extension Undocumented
Class Variable shared_lib_extension Undocumented
Class Variable shared_lib_format Undocumented
Class Variable static_lib_extension Undocumented
Class Variable static_lib_format Undocumented
Instance Variable cc Undocumented
Instance Variable cxx Undocumented
Instance Variable dll_libraries Undocumented
Instance Variable linker_dll Undocumented
Property gcc_version Undocumented
Property out_extensions Add support for rc and res files.
Method _compile Compiles the source by spawning GCC and windres if needed.
Method _make_out_path Undocumented

Inherited from UnixCCompiler (via CygwinCCompiler):

Method create_static_lib Link a bunch of stuff together to create a static library file. The "bunch of stuff" consists of the list of object files supplied as 'objects', the extra object files supplied to 'add_link_object()' and/or 'set_link_objects()', the libraries supplied to 'add_library()' and/or 'set_libraries()', and the libraries supplied as 'libraries' (if any).
Method find_library_file Second-guess the linker with not much hard data to go on: GCC seems to prefer the shared library, so assume that *all* Unix C compilers do, ignoring even GCC's "-static" option.
Method library_dir_option Return the compiler option to add 'dir' to the list of directories searched for libraries.
Method library_option Return the compiler option to add 'lib' to the list of libraries linked into the shared library or executable.
Method preprocess Preprocess a single C/C++ source file, named in 'source'. Output will be written to file named 'output_file', or stdout if 'output_file' not supplied. 'macros' is a list of macro definitions as for 'compile()', which will augment the macros set with 'define_macro()' and 'undefine_macro()'...
Class Variable executables Undocumented
Class Variable src_extensions Undocumented
Class Variable xcode_stub_lib_extension Undocumented
Static Method _library_root macOS users can specify an alternate SDK using'-isysroot'. Calculate the SDK root if it is specified.
Method _is_gcc Undocumented

Inherited from CCompiler (via CygwinCCompiler, UnixCCompiler):

Method add_include_dir Add 'dir' to the list of directories that will be searched for header files. The compiler is instructed to search directories in the order in which they are supplied by successive calls to 'add_include_dir()'.
Method add_library Add 'libname' to the list of libraries that will be included in all links driven by this compiler object. Note that 'libname' should *not* be the name of a file containing a library, but the name of the library itself: the actual filename will be inferred by the linker, the compiler, or the compiler class (depending on the platform).
Method add_library_dir Add 'dir' to the list of directories that will be searched for libraries specified to 'add_library()' and 'set_libraries()'. The linker will be instructed to search for libraries in the order they are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
Method add_link_object Add 'object' to the list of object files (or analogues, such as explicitly named library files or the output of "resource compilers") to be included in every link driven by this compiler object.
Method add_runtime_library_dir Add 'dir' to the list of directories that will be searched for shared libraries at runtime.
Method announce Undocumented
Method compile Compile one or more source files.
Method debug_print Undocumented
Method define_macro Define a preprocessor macro for all compilations driven by this compiler object. The optional parameter 'value' should be a string; if it is not supplied, then the macro will be defined without an explicit value and the exact outcome depends on the compiler used (XXX true...
Method detect_language Detect the language of a given file, or list of files. Uses language_map, and language_order to do the job.
Method executable_filename Undocumented
Method execute Undocumented
Method has_function Return a boolean indicating whether funcname is provided as a symbol on the current platform. The optional arguments can be used to augment the compilation environment.
Method library_filename Undocumented
Method link_executable Undocumented
Method link_shared_lib Undocumented
Method link_shared_object Undocumented
Method mkpath Undocumented
Method move_file Undocumented
Method object_filenames Undocumented
Method set_executable Undocumented
Method set_executables Define the executables (and options for them) that will be run to perform the various stages of compilation. The exact set of executables that may be specified here depends on the compiler class (via the 'executables' class attribute), but most will have: compiler the C/C++ compiler linker_so linker used to create shared objects and libraries linker_exe linker used to create binary executables archiver static library creator...
Method set_include_dirs Set the list of directories that will be searched to 'dirs' (a list of strings). Overrides any preceding calls to 'add_include_dir()'; subsequence calls to 'add_include_dir()' add to the list passed to 'set_include_dirs()'...
Method set_libraries Set the list of libraries to be included in all links driven by this compiler object to 'libnames' (a list of strings). This does not affect any standard system libraries that the linker may include by default.
Method set_library_dirs Set the list of library search directories to 'dirs' (a list of strings). This does not affect any standard library search path that the linker may search by default.
Method set_link_objects Set the list of object files (or analogues) to be included in every link to 'objects'. This does not affect any standard object files that the linker may include by default (such as system libraries).
Method set_runtime_library_dirs Set the list of directories to search for shared libraries at runtime to 'dirs' (a list of strings). This does not affect any standard search path that the runtime linker may search by default.
Method shared_object_filename Undocumented
Method spawn Undocumented
Method undefine_macro Undefine a preprocessor macro for all compilations driven by this compiler object. If the same macro is defined by 'define_macro()' and undefined by 'undefine_macro()' the last call takes precedence (including multiple redefinitions or undefinitions)...
Method warn Undocumented
Constant EXECUTABLE Undocumented
Constant SHARED_LIBRARY Undocumented
Constant SHARED_OBJECT Undocumented
Class Variable language_map Undocumented
Class Variable language_order Undocumented
Instance Variable dry_run Undocumented
Instance Variable force Undocumented
Instance Variable include_dirs include dirs specific to this compiler class
Instance Variable libraries Undocumented
Instance Variable library_dirs library dirs specific to this compiler class
Instance Variable macros Undocumented
Instance Variable objects Undocumented
Instance Variable output_dir Undocumented
Instance Variable runtime_library_dirs Undocumented
Instance Variable verbose Undocumented
Static Method _make_relative In order to ensure that a filename always honors the indicated output_dir, make sure it's relative. Ref python/cpython#37775.
Method _check_macro_definitions Ensures that every element of 'definitions' is a valid macro definition, ie. either (name,value) 2-tuple or a (name,) tuple. Do nothing if all definitions are OK, raise TypeError otherwise.
Method _find_macro Undocumented
Method _fix_compile_args Typecheck and fix-up some of the arguments to the 'compile()' method, and return fixed-up values. Specifically: if 'output_dir' is None, replaces it with 'self.output_dir'; ensures that 'macros' is a list, and augments it with 'self...
Method _fix_lib_args Typecheck and fix up some of the arguments supplied to the 'link_*' methods. Specifically: ensure that all arguments are lists, and augment them with their permanent versions (eg. 'self.libraries' augments 'libraries')...
Method _fix_object_args Typecheck and fix up some arguments supplied to various methods. Specifically: ensure that 'objects' is a list; if output_dir is None, replace with self.output_dir. Return fixed versions of 'objects' and 'output_dir'.
Method _get_cc_args Undocumented
Method _need_link Return true if we need to relink the files listed in 'objects' to recreate 'output_file'.
Method _prep_compile Decide which source files must be recompiled.
Method _setup_compile Process arguments and decide which source files to compile.
def __init__(self, verbose=0, dry_run=0, force=0): (source)
def runtime_library_dir_option(self, dir): (source)

Return the compiler option to add 'dir' to the list of directories searched for runtime libraries.