mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Qt compilation options


From: Romain Troit
Subject: Re: [Mingw-cross-env-list] Qt compilation options
Date: Tue, 06 Aug 2013 23:13:26 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

Hello,
have you tried to set

QMAKE_CFLAGS_RELEASE

in file settings.mk ?

On 06/08/2013 13:56, Werner LEMBERG wrote:
[mxe git repository from today]

Using mxe's unmodified Qt build, and linking it to my application, the
size of the binary increases from about 7MByte to 12MByte (after
stripping) if compared to a MinGW build.  This hurts.  I thus wonder
how to reduce it.

With MinGW, I've approximately followed

   http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler/

to compile Qt 4.8.3 statically, using the following call to Qt's
configuration script:

   configure -release \
             -nomake examples \
             -nomake demos \
             -no-exceptions \
             -no-stl -no-rtti \
             -no-qt3support \
             -no-scripttools \
             -no-openssl \
             -no-opengl \
             -no-webkit \
             -no-phonon \
             -no-style-motif \
             -no-style-cde \
             -no-style-cleanlooks \
             -no-style-plastique \
             -no-sql-sqlite \
             -platform win32-g++ \
             -static \
             -qt-libjpeg \
             -qt-zlib \
             -qt-libpng

I assume that `-no-exceptions', `-no-stl', and `-no-rtti' really help
reduce the library size, while most of the other options are rather
unimportant for static linking (please correct me if I'm wrong).

Changing the configure options in `qt.mk' is straightforward, however,
the above link also suggests to change compilation options by setting
QMAKE_CFLAGS_RELEASE.  How can I do this?

BTW, calling `strip' on the binary removes symbols from all statically
linked stuff also, right?


     Werner


PS: I know that I won't use C++ exceptions in my code :-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]