IMPORTANT: The Bazel docs have moved! Please update your bookmark to https://bazel.build/rules/lib/CcStarlarkApiProvider

You can read about the migration, and let us know what you think.

Extensions > API reference > CcStarlarkApiProvider

CcStarlarkApiProvider

Provides access to information about C++ rules. Every C++-related target provides this struct, accessible as a cc field on target.

compile_flags

list CcStarlarkApiProvider.compile_flags

Returns the list of flags used to compile this target (possibly empty but never None).

defines

list CcStarlarkApiProvider.defines

Returns the list of defines used to compile this target (possibly empty but never None).

include_directories

list CcStarlarkApiProvider.include_directories

Returns the list of include directories used to compile this target (possibly empty but never None).

libs

depset CcStarlarkApiProvider.libs

Returns the depset of libraries for either FULLY STATIC mode (linkopts=["-static"]) or MOSTLY STATIC mode (linkstatic=1) (possibly empty but never None)

list CcStarlarkApiProvider.link_flags

Returns the list of flags given to the C++ linker command for either FULLY STATIC mode (linkopts=["-static"]) or MOSTLY STATIC mode (linkstatic=1) (possibly empty but never None)

quote_include_directories

list CcStarlarkApiProvider.quote_include_directories

Returns the list of quote include directories used to compile this target (possibly empty but never None).

system_include_directories

list CcStarlarkApiProvider.system_include_directories

Returns the list of system include directories used to compile this target (possibly empty but never None).

transitive_headers

depset CcStarlarkApiProvider.transitive_headers

Returns a depset of headers that have been declared in the src or headers attribute(possibly empty but never None).