If you are building static, you can use the ld.gold linker which prunes a
lot of unused code off, and maybe add in -Os to QMAKE_LFLAGS. It might not
hurt to do a second "strip" after your executable is built too.  Anything
using location or webkit is going to pull in a lot though.

On Thu, Aug 26, 2021 at 12:59 AM Mitch Curtis <mitch.cur...@qt.io> wrote:

> There is this useful website:
>
> https://qtlite.com/
>
> Pick e.g. Qt 5.15.x (it seems that the Qt 6 versions don't work with it),
> then the modules you use, and it will give you a complete list of every
> feature you can disable for that module.
>
> Although like Thiago says, not all of them are guaranteed to result in a
> successful build. There are a huge number of combinations, and Qt's CI
> already has to test with lots of different target platforms, so it only
> checks a limited set of features. If you're going to disable a lot of
> features, you'll probably want to get comfortable with Qt's contribution
> process in order to fix any build breakages.
>
> > -----Original Message-----
> > From: Interest <interest-boun...@qt-project.org> On Behalf Of Ben
> Cottrell
> > Sent: Thursday, 26 August 2021 4:28 AM
> > To: interest@qt-project.org
> > Subject: [Interest] Installation Sizes for Applications using Qt
> >
> > Qt is becoming more and more feature rich, but applications aren't
> getting
> > any smaller. I wish there was easier ways of configuring and building Qt
> with
> > shared libraries containing only the necessary functionality. Maybe more
> > modularity is the answer.
> >
> > I want to comply with the LGPL license, but I wish the libraries were
> smaller.
> > I've tried building Qt from source, without success on GNU/Linux.
> >
> > I've also tried Sciter, which is a single library for Microsoft Windows,
> Apple
> > macOS and GNU/Linux. This and an executable using the library at runtime
> > come in at around ~11MB.
> >
> > On other systems where Qt libraries are not installed system wide, such
> as
> > Microsoft Windows, it can be several times bigger in total.
> >
> > I could use smaller libraries like Sciter, but I miss out on the
> versatility of Qt's
> > API's, and it's implementations for all sorts of devices and operating
> systems.
> >
> > Can we make it easier to reduce application installation sizes?
> > _______________________________________________
> > Interest mailing list
> > Interest@qt-project.org
> > https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>


-- 
Chris Benesch
BeneschTech, LLC
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to