[Qbs] Passing unescaped flags to the linker

Christian Kandeler christian.kandeler at qt.io
Wed Nov 1 11:09:03 CET 2017


On Tue, 31 Oct 2017 15:59:47 +0100
Benjamin TERRIER <b.terrier at gmail.com> wrote:

> I am experimenting with qbs and a gcc toolchain for an embedded arm
> device. Is there a way
> to pass unescaped flags to g++ when invoking the linker ?
> 
> For instance I need to pass "--specs=nano.specs" to g++. If I put it
> in cpp.linkerFlags it does
> not work as qbs will escape it with "-Wl". I can put it in
> cpp.driverFlags, but then it get passed
> to every call to g++ which is useless and generates warning when using
> Clang Static Analyzer:
> 
> clang.exe: warning: argument unused during compilation: '--specs=nano.specs'

Yes, that is a bit of a problem. We really need cpp.linkerDriverFlags with the semantics "flags to pass only when linking using the compiler binary". The need for that has been debated in the past, but I think the case is pretty clear now. Could you please create a task for that at bugreports.qt.io, citing your use case?


Thanks,
Christian



More information about the Qbs mailing list