[Qbs] Passing unescaped flags to the linker

Timur Kristóf timur.kristof at gmail.com
Thu Nov 2 11:50:53 CET 2017


> I use the latest versions (Qt Creator 4.4.1 and QBS 1.9.1) available on Windows.
> I just configured a Kit with my ARM toolchain, created a minimal qbs
> project that compile
> and run the static analyzer.

What I did was to set up scan-build as a compiler wrapper in my qbs file, so
arm-none-eabi-g++ ...
scan-build arm-none-eabi-g++ ...
And it didn't complain for any of those flags. But this was months
ago, and I couldn't exactly figure out how to make it work (due to
qbs-unrelated issues), so maybe the latest version of the static
analyzer works differently now.

> If I managed to make the Build step works, I haven't managed to make
> the static analyzer work completely.
> My first issue is that clang ignores the system includes in the
> sysroot (every libc or STL include fails),
> so I had to add those folders with cpp.includePaths (also I haven't
> found a way to add those only when
> running the static analyzer: putting a condition on the compiler does
> not work as gcc is still considered to be the compiler
> even if it is clang that does the static analysis). My current issue
> is that clang fails each time
> it meets a bit of assembly code in a c/c++ file, likely because it
> does not use the ARM assembler.

After my initial experiments, I thought there must be someone who made
it work, so I posted a StackOverflow question.
It is still unsolved, but maybe it is of some help to you:

Now we are off-topic with regards to the qbs mailing list, but I'm
very interested in your static analyzer effort, so please let me know
if you find a way to get it working!


More information about the Qbs mailing list