[cfe-dev] LibTooling question

Manuel Klimek klimek at google.com
Wed Aug 1 13:15:11 PDT 2012


On Wed, Aug 1, 2012 at 4:27 PM, Mario Schwalbe
<mario at se.inf.tu-dresden.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> maybe I should have mentioned that I use the latest release version of LLVM and clang.

That would explain it - I'd strongly suggest to use current trunk for
tooling - it's new enough that there are significant bugfixes.

Cheers,
/Manuel

>
> Am 01.08.2012 16:10, schrieb Manuel Klimek:
>>> I need more context to reproduce. For me, with the latest clang-check built from head, and the following setup: [...] Which looks exactly like it should.
>>>
>>> Can you post the output of calling your tool with -- -c -v?
>
> $ /tmp/ClangCheck /tmp/TestProg.c -- -c -v
> Processing: /tmp/TestProg.c.
> clang version 3.1 (branches/release_31)
> Target: x86_64-unknown-linux-gnu
> Thread model: posix
> clang Invocation:
>  "clang-tool" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all"
>  "-disable-free" "-main-file-name" "TestProg.c" "-mrelocation-model" "static"
>  "-mdisable-fp-elim" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables"
>  "-target-cpu" "x86-64" "-target-linker-version" "2.22" "-momit-leaf-frame-pointer"
>  "-v" "-coverage-file" "TestProg.o" "-resource-dir" "../lib/clang/3.1" "-working-directory" "."
>  "-fmodule-cache-path" "/var/tmp/clang-module-cache" "-internal-isystem" "/usr/local/include"
>  "-internal-isystem" "../lib/clang/3.1/include" "-internal-externc-isystem"
>  "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include"
>  "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir" "/tmp" "-ferror-limit" "19"
>  "-fmessage-length" "100" "-mstackrealign" "-fgnu-runtime" "-fobjc-runtime-has-arc"
>  "-fobjc-runtime-has-weak" "-fobjc-fragile-abi" "-fdiagnostics-show-option" "-fcolor-diagnostics"
>  "-o" "TestProg.o" "-x" "c" "/tmp/TestProg.c"
>
> clang -cc1 version 3.1 based upon LLVM 3.1 default target x86_64-unknown-linux-gnu
> ignoring nonexistent directory "/usr/local/include"
> ignoring nonexistent directory "../lib/clang/3.1/include"
> ignoring nonexistent directory "/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/include/x86_64-linux-gnu
>  /usr/include
> End of search list.
> In file included from /tmp/TestProg.c:1:
> /usr/include/stdio.h:34:11: fatal error: 'stddef.h' file not found
> # include <stddef.h>
>           ^
> 1 error generated.
> Error while processing /tmp/TestProg.c.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJQGTzLAAoJEDv0fP6GapNtJfIH/32ZZV8/oRQ94MMHtS0UKBps
> x3WZbPJjtPgTgIrzW9Ej200XD96LdolqTZyZImmFT/fhpdHTH4kILpWcN4OwIpep
> JTu+2jkwzQ/ERGTOgO2aq+KS59dgsF87QZsujvXlldm4lV+c0PfheA8UGp/Gnwi7
> hHHUikEQSn+kP/5QXFt0kPefICzmWjDdqFtA1M79M7h5AL8luf1TQDO0PdJCsLVr
> Isbhd9waoDQneKCFgJoLySm8NxvkRXlErw2aaGk3tZ4nvSr90aGrdjNVdkJhxYp0
> iVyFjOQ95BIk1k/aMVr/inLT4uHVA2ittrFyjPdBEo/1t5vG+ef7xBugtHB6Md8=
> =WLP9
> -----END PGP SIGNATURE-----



More information about the cfe-dev mailing list