[Interest] Size of libQt5Core in 5.3

John Layt jlayt at kde.org
Sun May 11 17:39:15 CEST 2014


On 11 May 2014 08:20, Daniel Bowen <qtmailinglist1 at bowensite.com> wrote:

> Is there any way to get Qt Core to compile smaller, like under 3MB? Am I
> missing anything to skip or “-no-xyz” or “-nomake” or “-no-feature”?  Why is
> libQt5Core.so.5.3.0 so much bigger than libQtCore4.so.4.8.4?

I'll leave it for others to pass comment on the standard configure
options and size, but if you're really desperate for every last saving
then removing the locales you don't need can save you 230 KB (on Linux
64bit it reduces my default release build from 5.5MB to 5.2MB), but
it's a manual process:

1) Download http://unicode.org/Public/cldr/24/core.zip and unzip
2) Run "../path/to/qt5/qtbase/util/local_database/cldr2qlocalexml.py
core/common/main  >> qlocale.xml"
3) Edit qlocale.xml to remove all the locales you don't need: only
remove <locale> groups from inside <localeList> and nothing else, I
suggest you always keep C and en_US in addition to the locales you
require.
4) Run "../path/to/qt5/qtbase/util/local_database/qlocalexml2cpp.py
qlocale.xml  ../path/to/qt5/qtbase/"

I could probably modify the locale_database scripts to make it easier
to choose a list of required locales, but I'm hoping to work on the
QLocale rewrite for 5.4 to remove the data entirely.

Cheers!

John.



More information about the Interest mailing list