https://bugs.llvm.org/show_bug.cgi?id=41579
Bug ID: 41579
Summary: Clang fails if run in the presence of GCC PCH files
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: libclang
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
When GCC creates its precompiled headers it writes them into a GCC-specific
directory, <file>.gch, because the format is private to GCC.
Unfortunately when clang runs, it looks into the private GCC directory .gch for
precompiled headers as well, it detects the GCC percompiled headers, tries to
read them, and immediately fails because the format is different:
$ g++ ... -Winvalid-pch --include=foo_pch.h ...
$
But:
$ clang++ ... --include=foo_pch.h ...
error: no suitable precompiled header file found in directory
'./foo_pch.h.gch'
1 error generated.
I don't want clang to read these precompiled headers: they're for GCC. And I
don't want to have to create clang's precompiled headers because I'm just using
a tool built with libLLVM that does some code parsing, I don't need (and
actually can't create because this tool doesn't support it) precompiled
headers.
I just want clang to run, include the header file I've listed with my
--include=<foo>.h, and pay no attention to any GCC-specific precompiled headers
that it can't parse anyway.
Is there no option available to clang that will disable searching for PCH? And
why does clang even try to look at GCC's PCH directory, if it can't parse GCC
PCH files anyway?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs