Unsolved Qt Build (qt-everywhere) where neither -release nor -debug are specified
-
I have cross-compiled Qt several times for different target systems and I am running into a bit of a curiosity in the build system. I have four different builds:
- Static
- Static with release specified
- Static with debug specified
- Dynamic
Looking at the size of the resulting library files, I am finding that, as expected, the size of static with release and static with debug are vastly different in size. However, all else being the same, I am finding that the difference between a static build with
-release
specified and one without any specification differ by a few hundred kilobytes.Here is part of the script that I use to perform the build, where
$OPT
can be-static
if static was specified, or is otherwise empty. This command includes the-release
option../configure -xplatform arm-xilinx-linux-aarch64 $OPT -no-opengl -release -opensource -confirm-license -nomake examples -skip qtquickcontrols -skip qtwebchannel -skip qtactiveqt -skip qtandroidextras -skip qtdeclarative -skip qtimageformats -skip qtmacextras -skip qtx11extras -skip qtxmlpatterns -skip qtconnectivity -skip qtdoc -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qttools -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwinextras -verbose -no-gif -no-libjpeg -no-mtdev -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-xcb -qt-freetype -no-fontconfig -no-harfbuzz -no-xcb-xlib -no-cups -no-iconv -no-icu -no-eglfs -no-openssl -prefix $ZYNQ_QT_INSTALL && make -j$(nproc) && make install
This is the same command with neither
-debug
nor-release
option specified../configure -xplatform arm-xilinx-linux-aarch64 $OPT -no-opengl -opensource -confirm-license -nomake examples -skip qtquickcontrols -skip qtwebchannel -skip qtactiveqt -skip qtandroidextras -skip qtdeclarative -skip qtimageformats -skip qtmacextras -skip qtx11extras -skip qtxmlpatterns -skip qtconnectivity -skip qtdoc -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtsensors -skip qttools -skip qttranslations -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwinextras -verbose -no-gif -no-libjpeg -no-mtdev -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-xcb -qt-freetype -no-fontconfig -no-harfbuzz -no-xcb-xlib -no-cups -no-iconv -no-icu -no-eglfs -no-openssl -prefix $ZYNQ_QT_INSTALL && make -j$(nproc) && make install
To be precise, the file size difference is 15751300 for libQt5Core.a with
-release
specified and 14899060 without any specification, both statically compiled.What is being built if neither
-debug
or-release
are specified? Why is there a difference in file size? -
One way to find the difference is to check the differences of Makefiles with -release and without any specification. The Makefiles may have different flags for build.
-
Is there a way to tell how a previous set of Qt libraries were compiled at the
./configure
command level? That is, if I have a set of libraries, can I see what configure options were employed?