• Thiago Macieira's avatar
    Fix linking of sources without LTCG to a static lib with LTCG · fe6f4b9a
    Thiago Macieira authored
    
    Whenever a binary is created and linked against a static lib that was
    compiled with LTCG, the final linking step requires the compiler flags
    so that the pre-compiled data in the shared library can get properly
    compiled.
    
    This could happen for a static build of Qt with LTCG, but also happens
    frequently for Qt's own build when linking regular libraries and
    applications against QtBootstrap or QtPlatformSupport. The linking fails
    when the target is a shared library (example: QtWaylandClient linking
    against QtPlatformSupport).
    
    The .prl file actually contains the "ltcg" flag, so the best solution
    would actually be to process that flag there and add link_ltcg if any
    dependent .prl has "ltcg", but I couldn't find out how to do that.
    
    Change-Id: I4a75a14d1dcb8c2089a427285e25d5555df7d7d3
    Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
    fe6f4b9a