[QBS] Patch suggestions

Joerg Bornemann joerg.bornemann at digia.com
Mon Oct 1 17:55:37 CEST 2012

On 01/10/2012 16:00, Vincent Gouvernelle wrote:

> I don't known where to give these possible patches to compile with
> MSVC-2012 and 64bits... So I give you my modification here... Maybe you
> can add it to your sources...

The wiki at http://qt-project.org/wiki/qbs has a (very short) hint how 
to contribute code. Every patch must go through gerrit for legal reasons.

> To compile in 64bit (for example by calling: qbs.exe release
> qbs.platform:MSVC2010 qbs.architecture:x86_64)
> Modify : share/qbs/modules/cpp/msvc.js by inserting on line 150 (after
> "var is64bit = (architecture == "x86_64")")
> the lines:
>       if (is64bit)
>           args.push('/MACHINE:X64')

Hmmm this shouldn't be necessary if qbs calls the right cl.exe from 
VC\bin\x86_amd64. Will look into this.

> To compile with msvc2012 (for example by calling qbs.exe release
> qbs.platform:MSVC2012 qbs.architecture:x86_64)
> We need to add the detection of this compiler.

Right, thanks!

> One more thing... I'd like to add some other flags to the compiler like
> /fp:precise and maybe others, what is the best way to do it ?

For special compiler flags, that qbs doesn't know about, you can use the 
cpp.cxxFlags property.

We have more of those:
cppFlags: additional flags for the C preprocessor
cFlags: additional flags for the C compiler
cxxFlags: additional flags for the C++ compiler
objcFlags: additional flags for the Objective-C compiler
linkerFlags: additional linker flags



More information about the Qbs mailing list