Il 11/05/2014 09:20, Daniel Bowen ha scritto:
So I started putting in -skip, -no-feature, etc.having features wewould
still use, but other things stripped out.I also had a mkspec use -Os to
optimize for size.Usingsomething likethis:

[snip]

Please note that several of those features don't even belong to QtCore, but to other libraries.

For instance: image formats, fonts, etc. belong to QtGui; other widget-related stuff belong to QtWidgets. You chose to skip those modules altogether (-no-widgets) so I don't see why also putting the feature switches there. (And, as a side note, I'm not sure that passing -no-feature-UPPERCASE would work...)

Apart from this: builds with feature switches are not really tested, so I'm not surprised that you have found a combination that doesn't even build. But we totally welcome patches that would fix such builds.

In particular, being able to skip building QRegularExpression should be able to save a lot -- especially if you not compile PCRE inside of QtCore (which brings in some huge Unicode tables). PCRE should add around 0,5MB between code and data. Note that this requires some extra changes (to configure and tools.pri) to support a non-PCRE build.

Other big players:
* mimetypes support -- bringing in another ~250K of data (i.e. roughly the gzipped size of the freedesktop's MIME database), plus its code;
* cryptographic hashes support.

In general you should take an analytic approach: pass

-Wl,-Map,qtcoremapfile

to QtCore's linker command line, and examine the map file using a script. Then proceed to trim.

Hope this helped,
--
Join us Oct 6-8 at BCC Berlin for Qt Developer Days 2014!
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company
Tel. UK +44-1738-450410, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

Attachment: smime.p7s
Description: Firma crittografica S/MIME

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to