[Qbs] How to set GCC optimization -O3 in releasebuilds?

Ola Røer Thorsen ola at silentwings.no
Thu Nov 30 23:45:51 CET 2017

Hi all,

what's the recommended way to configure qbs to build C++ code with GCC
using the -O3 optimizer level? I see it's using -O2 for the "fast"
qbs.optimization setting.

My intended workflow is to use -O3 when building from QtCreator in release
mode, while not having to set properties from the command line manually.
This is a somewhat large codebase with several static libraries and
applications (similar in structure as the Qt source tree), currently being
built using qmake.

I might also want to add more default compiler flags "globally"
(-ffast-math etc) at some point. Is it best to create my own
"CustomStaticLibrary" and "CustomApplication"-items and make sure to use
those everywhere instead of the regular ones provided with Qbs?

Best regards,
Ola Røer Thorsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171130/1d56f0d5/attachment.html>

More information about the Qbs mailing list