[Development] Using dwz on Qt

Alexandru Croitor alexandru.croitor at qt.io
Thu May 14 13:13:21 CEST 2020


Hi,

I haven't looked too much into the details, but quickly looking over Konstantin's code in OptionsQt.cmake, we already do something similar
in https://code.qt.io/cgit/qt/qtbase.git/tree/cmake/QtSeparateDebugInfo.cmake#n62

So i assume it should be straightforward to add dwz support.

> On 14. May 2020, at 12:39, Konstantin Tokarev <annulen at yandex.ru> wrote:
> 
> 
> 
> 14.05.2020, 13:34, "Allan Sandfeld Jensen" <kde at carewolf.com>:
>> Hi Qt
>> 
>> I recently discovered there is a binutils tools for size optimizing dwarf
>> debug symbols, and it really works. When applied to Qt debug symbol binaries
>> it makes them about 25% smaller on average (some up to 40% smaller). And that
>> is just the simple optimization. We can save more by combining duplicates from
>> multiple debug symbol binaries into one shared one, but that would change the
>> files we ship.
> 
> FWIW, I've already reported it at https://bugreports.qt.io/browse/QTBUG-82681
> 
>> 
>> In any case. While too late for 5.15 and written for qmake so not suitable for
>> qt6, I would like to share my minimal change with you here, in case anybody
>> would like to ship smaller debug binaries.
>> 
>> Is there an existing cmake way to trigger the same? Though we might also want
>> to consider triggering compressed dwarf symbols at the same time, as that is
>> another great reduction, but ups the minimum tool versions required.
> 
> FWIW, I'm using this code for separating and compressing debug info:
> https://github.com/qtwebkit/qtwebkit/blob/qtwebkit-dev-wip/Source/cmake/OptionsQt.cmake#L152-L167
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development



More information about the Development mailing list