pub struct CcInvocation { /* private fields */ }Expand description
A parsed, admitted C or C++ compile.
Implementations§
Source§impl CcInvocation
impl CcInvocation
Sourcepub fn parse(arguments: &[OsString]) -> Result<Self, CcBypassReason>
pub fn parse(arguments: &[OsString]) -> Result<Self, CcBypassReason>
Parse a driver command line, admitting only modeled single-object compiles.
Sourcepub fn parse_for(
arguments: &[OsString],
family: CcCompilerFamily,
) -> Result<Self, CcBypassReason>
pub fn parse_for( arguments: &[OsString], family: CcCompilerFamily, ) -> Result<Self, CcBypassReason>
Parse a command line using the syntax of family.
Sourcepub fn parse_msvc(arguments: &[OsString]) -> Result<Self, CcBypassReason>
pub fn parse_msvc(arguments: &[OsString]) -> Result<Self, CcBypassReason>
Parse a command line using Microsoft cl.exe syntax.
Sourcepub fn include_dirs(&self) -> &[PathBuf]
pub fn include_dirs(&self) -> &[PathBuf]
Include search directories named on the command line, in order.
Sourcepub fn required_inputs(&self) -> &[PathBuf]
pub fn required_inputs(&self) -> &[PathBuf]
Files that must appear among the discovered inputs.
Sourcepub fn language(&self) -> CcLanguage
pub fn language(&self) -> CcLanguage
Language the driver compiles.
Sourcepub fn source_name(&self) -> String
pub fn source_name(&self) -> String
Short label used for timing statistics.
Sourcepub fn dependency_arguments(&self, depfile: &Path) -> Vec<OsString>
pub fn dependency_arguments(&self, depfile: &Path) -> Vec<OsString>
Arguments to append so the driver writes a dependency list beside the object.
-MD rather than -MMD: system headers are exactly the inputs most
likely to change without any other key component noticing, because the
compiler identity does not cover the C library or the platform SDK.
Sourcepub fn dependency_arguments_for(
&self,
depfile: &Path,
family: CcCompilerFamily,
) -> Vec<OsString>
pub fn dependency_arguments_for( &self, depfile: &Path, family: CcCompilerFamily, ) -> Vec<OsString>
Arguments to append so a driver from family writes its dependency
list beside the object.
Sourcepub fn msvc_dependency_arguments(&self, depfile: &Path) -> Vec<OsString>
pub fn msvc_dependency_arguments(&self, depfile: &Path) -> Vec<OsString>
Arguments to append so cl.exe writes /sourceDependencies JSON.
Sourcepub fn invocation_digest(
&self,
context: &CcActionContext,
) -> Result<CacheDigest, CcBypassReason>
pub fn invocation_digest( &self, context: &CcActionContext, ) -> Result<CacheDigest, CcBypassReason>
Digest of the pre-input fingerprint, used to look up a prediction.
Sourcepub fn action(
&self,
context: CcActionContext,
) -> Result<CcAction, CcBypassReason>
pub fn action( &self, context: CcActionContext, ) -> Result<CcAction, CcBypassReason>
Build the canonical action for this invocation and its discovered inputs.
Sourcepub fn prediction(
&self,
context: &CcActionContext,
compiler_duration_ns: u64,
) -> Result<CcInputPrediction, CcBypassReason>
pub fn prediction( &self, context: &CcActionContext, compiler_duration_ns: u64, ) -> Result<CcInputPrediction, CcBypassReason>
Record the normalized inputs of a successful compile so the next cold invocation can rebuild the same key before compiling.
Trait Implementations§
Source§impl Clone for CcInvocation
impl Clone for CcInvocation
Source§fn clone(&self) -> CcInvocation
fn clone(&self) -> CcInvocation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more