JSON Compilation Database Parser support can detect compiler-built-in include paths and preprocessor macros.
The following table shows the compilers and their supported features detected.
| Compiler | Vendor | Macros | System include paths |
Local include paths |
MACOS Framework include paths |
|---|---|---|---|---|---|
| gcc | GNU Project | tested | tested | tested | NYI [1] |
| clang | LLVM Project | tested | tested | tested | NYI [2] |
| cl | Microsoft | N/A | N/A | N/A | N/A |
Support status above is either:
Some compilers, mainly those of the GNU Compiler Collection and derivatives, report different built-ins depending on the arguments passed to the compiler. These arguments specify a non-default language level or specify non-standard default system include directories. The table below shows an overview of the supported compilers and the recognized command-line options.
| Compiler | Vendor | Language Standard options |
Non-Standard System include paths options |
Other options |
|---|---|---|---|---|
| gcc | GNU Project | -std=, -ansi: tested |
--sysroot=, -isysroot=, --no-sysroot-prefix: tested |
-fPIC, -fpic, -fPIE, -fpie
-fstack-protector*, -march=, -march=, -mcpu=,
-mtune=, -pthread
|
| clang | LLVM Project | -std=, -ansi: tested |
--sysroot=, -isysroot=, --no-sysroot-prefix: tested |
Remarks:
gcc -E -P -dM -Wp,-v emty.c
running on OSX is needed.clang -E -P -dM -Wp,-v emty.c
running on OSX is needed.