2

I have created a C++ frontend using clang lib-tooling and RecursiveAStVisitor.

I use pre-generated compile_commands.json file to load compilation database. Sometimes compile command for a source file contains -include <file.h> compiler argument. For which clang tries to find the corresponding pre-compiled header file. If the PCH file is not present the clang aborts the compilation for the source file.

Is there any way to disable this behavior? So that if the PCH file is not found clang should continue compilation in the normal way.

Thanks in advance.

Hemant
  • 767
  • 6
  • 20

1 Answers1

-1

I know a solution for visual studio,but most likely the problem is same. You should generate a precompiled header for that file. have a look at this :

Precompiled headers with GCC

and also for an insight into pre compiled headers: Using Precompiled Headers

Not the exact solutions but something that can guide you to get one

Valgrind1691
  • 182
  • 1
  • 11