[cfe-dev] libclang and libstdc++ 4.8 problems
erik.verbruggen at me.com
Wed Jan 8 01:24:32 PST 2014
I have libclang integrated into the Qt Creator IDE, which works fine on Mac, but on Linux I run into problems. When the toolchain is GCC 4.8, with libstdc++ 4.8, any inclusion of stl headers results in parse errors. It comes down to a couple of __builtins used in x86intrin.h (included from opt_random.h) that clang doesn't know about. And as far as I can see, these errors prevent building a precompiled preamble, making it very slow.
I tried to solve this by putting clang's resource path as first include path (with -I) to have it find clang's version of x86intrin.h instead of the GCC one. However, it looks like the driver will re-order the include paths and always move the resource path to the bottom. Is that the case, or did I overlook something?
Or, phrased differently, how can I use libclang with libstdc++4.8? The only work-around I came up with is to put declarations for those missing builtins into a header file, and -include that file on the command-line.
More information about the cfe-dev