pub struct CompileAction {
pub standard: LanguageStandard,
pub gnu_extensions: bool,
pub source: Utf8PathBuf,
pub object: Utf8PathBuf,
pub mode: CompileMode,
pub implicit_inputs: Vec<Utf8PathBuf>,
pub depfile: Option<Utf8PathBuf>,
pub compiler: Utf8PathBuf,
pub compiler_wrapper: Option<Utf8PathBuf>,
pub arguments: CompileArguments,
pub description: String,
}Expand description
Compile one translation unit.
Fields§
§standard: LanguageStandardEffective language standard for this translation unit. Also
determines the source language (standard.language()), which
selects the rule / lowered action kind, /EHsc, and the
/Tp / /Tc source-language flag on MSVC.
gnu_extensions: boolWhether this translation unit compiles with GNU language
extensions. Strictly per-target: two compiles in one build
may differ in both level and this flag. The GNU/Clang
lowering spells the standard -std=gnu… instead of
-std=c…; the planner rejects the flag on the MSVC dialect
before lowering (cl.exe has no GNU dialect mode).
source: Utf8PathBufAbsolute path of the translation unit to compile.
object: Utf8PathBufObject file the normal build produces. Retained even in
CompileMode::SyntaxOnly so the stamp lives beside it and
the workspace-scope filter in cabin check can match on it.
mode: CompileModeObject vs. syntax-only.
implicit_inputs: Vec<Utf8PathBuf>Inputs the compile depends on but that are not command
arguments (e.g. a generated source produced upstream). The
source is the sole compiled input and is not repeated here.
depfile: Option<Utf8PathBuf>Header-dependency tracking file. Some records that the
dialect should wire dependency discovery for this compile -
the GNU/Clang lowering emits a -MD -MF <depfile> Makefile
depfile here (-MD, not -MMD, so headers found through a
system include dir still land in the depfile and keep
invalidating rebuilds), while the MSVC lowering ignores the
path and relies on /showIncludes.
compiler: Utf8PathBufCompiler driver executable.
compiler_wrapper: Option<Utf8PathBuf>Optional compiler wrapper (e.g. ccache) prepended to
the run command by lowering. Never affects
compile_commands.json, which records the underlying compiler
so IDE tooling sees the real driver.
arguments: CompileArgumentsSemantic compile arguments (optimization, defines, includes).
description: StringHuman-readable description for build output (CXX foo.o,
CHECK foo.o).
Trait Implementations§
Source§impl Clone for CompileAction
impl Clone for CompileAction
Source§fn clone(&self) -> CompileAction
fn clone(&self) -> CompileAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CompileAction
impl Debug for CompileAction
impl Eq for CompileAction
Source§impl PartialEq for CompileAction
impl PartialEq for CompileAction
Source§fn eq(&self, other: &CompileAction) -> bool
fn eq(&self, other: &CompileAction) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompileAction
Auto Trait Implementations§
impl Freeze for CompileAction
impl RefUnwindSafe for CompileAction
impl Send for CompileAction
impl Sync for CompileAction
impl Unpin for CompileAction
impl UnsafeUnpin for CompileAction
impl UnwindSafe for CompileAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.