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

Ola Røer Thorsen ola at silentwings.no
Thu Dec 14 21:01:03 CET 2017


2017-12-14 18:02 GMT+01:00 Christian Kandeler <christian.kandeler at qt.io>:

> On Thu, 14 Dec 2017 17:46:56 +0100
> Ola Røer Thorsen <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20171214/4a6251cb/attachment.html>


More information about the Qbs mailing list