0

I want to do a light build of Qt by disabling some of the features I don't need following the doc at this address http://doc.qt.io/qt-5.7/configure-options.html

As stated

The -feature- and -no-feature- options include and exclude specific features, respectively, where is listed in the file qtbase/src/corelib/global/qfeatures.txt.

Though when trying to use it, it doesn't seem to recognize that option

Unknown option -no-feature-accessibility

I've tried with other features but doesn't seem to be implemented in Qt5.7

As well, the configure -h doesn't do any mention of this option.

Does this was stripped on recent version of Qt and the doc wasn't updated, or has this option name changed. Is there still a way with Qt5.7 to disable features ?

Damien
  • 1,492
  • 10
  • 32
  • TL;DR: Qt's feature system is not supported and has bit rotted. It's not generally usable, and the documentation is out of date. Some features are disable-able using dedicated switches, but most of them aren't. – Kuba hasn't forgotten Monica Sep 18 '16 at 20:04
  • Plus I doubt it will really be much of a saver in terms of footprint. I am able to get a static build with the options below plus a few more at about 520 MB - that is building only static release libs. – dtech Sep 18 '16 at 20:39

1 Answers1

1

It is no the only option listed in the config but actually missing. For accessibility in particular you should configure with:

-no-accessibility

But be advised, there are Qt modules which depend on accessibility, and will not be built if you remove it in the configuration. For example - QtQuick.Controls and QtQuick.Dialogs. There might be more...

Here are some options I use to streamline my builds by removing features I don't need. Just exclude things that you actually need:

-no-compile-examples -no-icu -opengl desktop -skip qtscript -nomake examples -nomake tests -skip qtwebengine -skip qtvirtualkeyboard -skip qtcharts -skip qtwebchannel -skip qtpurchasing -skip qtwayland -skip qtwebview -no-qml-debug
dtech
  • 47,916
  • 17
  • 112
  • 190