[cfe-dev] Clang tooling and cross compiled code bases

Manuel Klimek klimek at google.com
Mon Sep 10 22:10:13 PDT 2012

On Tue, Sep 11, 2012 at 2:09 AM, Andrew McGregor <andrewmcgr at gmail.com> wrote:
> On 10/09/2012, at 5:56 PM, Manuel Klimek <klimek at google.com> wrote:
>> When I try to compile this (no tooling involved, just plain clang):
>> $ ~/build/llvm/bin/clang -c t2.c -fno-signed-char
>> clang-3: warning: argument unused during compilation: '-fno-signed-char'
>> <...>
>> According to chandlerc the right way to pass this to clang is to use
>> -funsigned-char. Unfortunately that doesn't make the code snippet
>> compile either:
>> $ ~/build/llvm/bin/clang -c t2.c -funsigned-char
>> t2.c:12:10: warning: passing 'uint8_t [5]' to parameter of type 'char
>> *' converts between pointers to integer types with different sign
>> [-Wpointer-sign]
>> <...>
>> So, that doesn't really seem to be a reduction of the problem you're seeing.
>> -internal-isystem (I assume you meant that instead of
>> "-isystem-internal") is a red herring, too - it shouldn't be in a
>> compilation database, it's an internal flag.
> Sure is, but for some reason I couldn't use just -isystem.  I guess I should revisit that problem.
> Context is, the compilation database is synthetic; the project compiles with gcc, but I have to manufacture a compilation database for the benefit of static analysis and refactoring tools.

Optimally your build system would do that for you - what build system
are you using?


More information about the cfe-dev mailing list