[Qbs] How do I tell qbs to use the nasm assembler when building using QtCreator and a Qt kit?

Denis Shienkov denis.shienkov at gmail.com
Fri Dec 15 06:11:09 CET 2017


 > I'll have a similar Group item containing assembly

Hi, seems, you need to use Properties item instead of Group item to use 
cpp.assemblerName .

BR, Denis


14.12.2017 23:01, Ola Røer Thorsen пишет:
> 2017-12-14 18:02 GMT+01:00 Christian Kandeler 
> <christian.kandeler at qt.io <mailto:christian.kandeler at qt.io>>:
>
>     On Thu, 14 Dec 2017 17:46:56 +0100
>     Ola Røer Thorsen <ola at silentwings.no <mailto:ola at silentwings.no>>
>     wrote:
>
>     > It's running when I tag the files with "asm", but using the
>     assembler "as"
>     > instead of "nasm". Any way to override that here for this
>     particular group
>     > of files? The source files are not compatible with "as".
>
>     You need to set cpp.assemblerName, either in the profile or in
>     your product(s).
>
>
> Right. I had only tried setting it inside the Group item, but that 
> didn't have any effect. I need another Properties item instead to 
> conditionally set the cpp.assemblerName then?
>
> Group {
>     name: "asm-linux-x86_64"
>     condition: qbs.architecture === "x86_64"
>     files: [ ...the .asm files ]
>     cpp.assemblerName: "nasm"
> }
>
> I'll have a similar Group item containing assembly code for linux 
> armv5t and yet another one for Windows, that's why I tried setting the 
> cpp.assemblerName inside the group.
>
> Setting cpp.assemblerName outside the Group item makes qbs run nasm, 
> but then it's using some options tailored for "as" (I guess) that 
> won't work with nasm:
> nasm: error: unrecognised option `--64'
> type `nasm -h' for help
>
> At this point I'm probably better of writing my own Rule item to 
> process each of the .asm files using nasm, to have full control? 
> (output artifacts tagged with "obj"?)
>
> Cheers,
> Ola
>
>
>
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171215/82af9ac9/attachment.html>


More information about the Qbs mailing list