dextool.compilation_db.system_compiler

Members

Functions

deduceSystemIncludes
SystemIncludePath[] deduceSystemIncludes(CompileCommand cmd, Compiler compiler)
SystemIncludePath[] deduceSystemIncludes(string[] cmd, Compiler compiler)

Execute and inspect the compiler for the system includes.

Structs

Compiler
struct Compiler
Undocumented in source.
SystemIncludePath
struct SystemIncludePath
Undocumented in source.

Meta

License

MPL-2

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

This module can deduce the system compiler flags, if possible, from the compiler specified in a CompileCommand.

The module assumes that during an execution the system flags for a compiler do not change thus they can be cached. This avoids having to invoke the compiler more than necessary.

This module exists for those times that: * a cross-compiler which uses other system headers than the hosts system compiler. E.g. clang-tidy do not know *what* these are thus this module discoveres them and provide them. * multiple compiler versions are used in a build and each have different headers.