Skip to content
  • Chun-wei Fan's avatar
    giscanner/ccompiler.py: Initiate Distutils Compiler Instance · 0638f9f1
    Chun-wei Fan authored
    This updates the __init__ constructor method of CCompiler so that distutils
    can be used, with some environment or user-supplied options to create the
    compiler instance that is appropriate with the platform that the giscanner
    scripts are being run on, and sets some specific environment for the
    compilers as necessary.  This also adds a check_is_msvc() method that will
    progressively replace calls in the other giscanner scripts that attempt to
    check for CC=cl (or so), where a part of which is done in this patch.  This
    is done for dumper.py as well as it needs to be updated in this patch to
    use the updated ccompiler.py which uses distutils to initiate the compiler
    instance.
    
    Also, as we have been using the --library option on Windows to pass in the
    library (not DLL) to deduce the correct DLL to link to in the introspection
    files for some time, we no longer need to make a copy of the library (.lib)
    to introspect that matches the <namespace>-<namespace_version>.lib
    convention, but use the libraries that were passed in with --library
    directly, so that we can link the dumper program during the introspection
    build.
    
    Please note that this also partially reverts commit c9cfa2b5 as the
    distutils items are clearly needed for these to work.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=728313
    0638f9f1