Not all compiler flags passed to KDevelop's internal C/C++ parser

Aleix Pol aleixpol at kde.org
Sat Sep 9 23:03:40 UTC 2017


On Sat, Sep 9, 2017 at 3:44 PM, Kevin Funk <kfunk at kde.org> wrote:
> Just a FYI:
>
> My question from a few days ago:
> ‎[00:04] ‎<‎kfunk‎>‎ apol: is it possible that in CMake server mode -fPIC is
> stripped?
>
> On Saturday, 9 September 2017 02:22:31 CEST Aleix Pol wrote:
>> it shouldn't matter, if it happens, it's a bug
>>
>> We should figure this out before the release anyway.
>
> Yeah, I figured out that we actually *never* feed -fPIC & friends to libclang.
> That's just not implemented.
>
> If you press enable "Show Imports" in the Problems tool view in a Qt-based
> project you'll end up with "Qt need to be compiled with -fPIC" errors...
>
> It looks like we might need to pass more compiler flags from the information
> extracted from compile_commands.json / CMake server to libclang in order to
> resemble the exact same set of compiler flags in KDevelop as the user would
> have when compiling from command line. Right now we're only extracting
> information about includes & defines.

You are very right. Working on a patch.

TBH, I had seen something of the sort but never understood it as such
issue. *bangs head against the wall*

On the bright side, expect a patch in a minute.

Aleix


More information about the KDevelop-devel mailing list