# Compiler Built-ins Detection Support Overview

JSON Compilation Database Parser support can detect compiler-built-in include paths and preprocessor macros.

## Invariant Built-ins Detection Support

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:

tested
  detection is known to work
implemented (impl)
  support is implemented, but not (yet) known to work
not yet implemented (NYI)
  support is not implemented
not available (N/A)
  the compiler does not support detection (regarding the online docs only)

### Compilers supported through separate plug-ins

## Enhanced Built-ins Detection Support

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:

- [1] Help wanted! To implement this, the output of `gcc -E -P -dM -Wp,-v emty.c` running on OSX is needed.
- [2] Help wanted! To implement this, the output of `clang -E -P -dM -Wp,-v emty.c` running on OSX is needed.

### Compilers supported through separate plug-ins