Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108719

[MSVC] Improve the LTCG build

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.5.0
    • None
    • Build System: CMake
    • None
    • Windows
    • 0d708a9aa (dev)

      Currently if we enable LTCG, it will be enabled globally for all CMake targets. On Windows Qt will use the bundled 3rd party libraries, which will always be built as static libraries, and enabling LTCG for them will produce very large output, usually greater than 100MB per file. If we are building static Qt, it's fine because we don't have any dlls and the .lib files are all very large (that's exptected), but for shared Qt, it's not good, it makes the Qt package way too large than normal builds. Maybe we can optimize this.

      NOTE: Only happens on MSVC. clang (clang-cl and clang-mingw) and gcc-mingw won't produce such big static library even if LTO is enabled.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtbuildsystem Qt Build System Team
            wangwenx190 赵 宇航
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes