Extensions >
API reference >
CompilationContext
CompilationContext
Immutable store of information needed for C++ compilation that is aggregated across dependencies.
defines
depset CompilationContext.defines
Returns the set of defines needed to compile this target. Each define is a string. These values are propagated to the target's transitive dependencies.
list CompilationContext.direct_headers
Returns the list of modular headers that are declared by this target. This includes both public headers (such as those listed in "hdrs") and private headers (such as those listed in "srcs").
list CompilationContext.direct_private_headers
Returns the list of modular private headers (those listed in "srcs") that are declared by this target.
list CompilationContext.direct_public_headers
Returns the list of modular public headers (those listed in "hdrs") that are declared by this target.
list CompilationContext.direct_textual_headers
Returns the list of textual headers that are declared by this target.
framework_includes
depset CompilationContext.framework_includes
Returns the set of search paths (as strings) for framework header files. Usually passed with -F.
depset CompilationContext.headers
Returns the set of headers needed to compile this target.
includes
depset CompilationContext.includes
Returns the set of search paths (as strings) for header files referenced both by angle bracket and quotes. Usually passed with -I.
local_defines
depset CompilationContext.local_defines
Returns the set of defines needed to compile this target. Each define is a string. These values are not propagated to the target's transitive dependencies.
quote_includes
depset CompilationContext.quote_includes
Returns the set of search paths (as strings) for header files referenced by quotes, e.g. #include "foo/bar/header.h". They can be either relative to the exec root or absolute. Usually passed with -iquote.
system_includes
depset CompilationContext.system_includes
Returns the set of search paths (as strings) for header files referenced by angle brackets, e.g. #include <foo/bar/header.h>. They can be either relative to the exec root or absolute. Usually passed with -isystem.