pub struct ToolContext<'a> {
pub kind: CompilerKind,
pub include: &'a [PathBuf],
pub msvc: Option<&'a Version>,
pub gnuc: Option<&'a Version>,
}Expand description
What a Clang-based tool is told about the compiler a build ran with, besides its arguments.
Fields§
§kind: CompilerKindThe compiler.
include: &'a [PathBuf]The resolved INCLUDE, in order (Prepared::include_dirs).
msvc: Option<&'a Version>The cl version of the MSVC toolset, whose _MSC_VER the build sees;
None without a toolset, when no version is written.
gnuc: Option<&'a Version>GCC’s version, whose __GNUC__ the build sees, for GCC; None
otherwise.
Implementations§
Source§impl<'a> ToolContext<'a>
impl<'a> ToolContext<'a>
Sourcepub fn of(selected: &'a Selected, include: &'a [PathBuf]) -> ToolContext<'a>
pub fn of(selected: &'a Selected, include: &'a [PathBuf]) -> ToolContext<'a>
What a tool is told about selected, whose environment gives
include (Prepared::include_dirs). Which versions the build sees,
and through which macro, are read from selected here, once for
every caller: a tool told the wrong one analyses other code than the
build compiles.
Trait Implementations§
Source§impl<'a> Clone for ToolContext<'a>
impl<'a> Clone for ToolContext<'a>
impl<'a> Copy for ToolContext<'a>
Auto Trait Implementations§
impl<'a> Forget for ToolContext<'a>
impl<'a> Freeze for ToolContext<'a>
impl<'a> Move for ToolContext<'a>
impl<'a> RefUnwindSafe for ToolContext<'a>
impl<'a> Send for ToolContext<'a>
impl<'a> Sync for ToolContext<'a>where
RawVecInner: Sync,
impl<'a> Unpin for ToolContext<'a>
impl<'a> UnsafeUnpin for ToolContext<'a>
impl<'a> UnwindSafe for ToolContext<'a>
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
Mutably borrows from an owned value. Read more