[Qbs] Cpp module for WebAssembly

Richard Weickelt richard at weickelt.de
Tue Oct 27 17:03:24 CET 2020


On 27.10.2020 12:27, Dan Pat wrote:
>     You can provide your own cpp implementation by overriding the search
>     path, but I don't see how you would be able to refer to the contents of
>     the original directory. Note that the files there are implementation
>     details and their presence and names cannot be relied upon. It's not a
>     supported use case to derive from these items. So to achieve what you
>     want, you'd have to copy the qbs module files you want to extend
> 
> 
> My fears confirmed.

If it is only for development on your machine and your ownly goal is to put
your module under version control in your product directory, then you can do:

import "/path/to/qbs/modules/cpp/GenericGcc.qbs" as GenericGcc

GenericGcc {
    // hack hack hack
}

> 
>     Out of curiosity: Which special features does it implement and why are
>     they not suitable for upstreaming?
> 
>  
> The goal is to get qbs projects compiled to WebAssembly using the emscripten
> toolchain (and Qt WebAssembly). As for upstreaming: I have managed to come
> up with a working but hacky solution (a small test project) which I
> believe has room for improvement. 

This sounds fantastic! Keep on hacking and upload a patch soon. See
https://code.qt.io/cgit/qbs/qbs.git/tree/CONTRIBUTING.md

Richard


More information about the Qbs mailing list