Skip to content
  • Bill Somerville's avatar
    GetPrerequisites: Optionally filter "objdump" output for speed · 5d0a8b1a
    Bill Somerville authored and Brad King's avatar Brad King committed
    As dumpbin.exe is no longer reliable for gcc libraries on MinGW because
    it crashes on many common libraries like libgcc_s and libgfortran it is
    now necessary too resort to using objdump for DLL dependency walking.
    Using objdump has a secondary problem in that it generates a lot of
    output for large libraries and causes fixup_bundle() to take many
    minutes to process what took fractions of a second with
    "dumpbin.exe /dependents".
    
    Add a 'grep' pre-filter in the execute_process() command pipeline to
    reduce this output to a minimum for a several orders of magnitude speed
    up.  If grep is not available just use the full output.
    
    As there does not seem to be a reliable way of detecting MinGW, callers
    of fixup_bundle() may have to set the variable gp_tool to "objdump" if
    dumpbin.exe is installed on the build machine to stop it using the
    broken MS dumpbin.exe for library dependency walking.
    5d0a8b1a