pub struct CppBuild {
pub compiler: String,
pub compiler_version: Option<String>,
pub linker: Option<String>,
pub macros: Vec<String>,
pub include_paths: Vec<String>,
pub flags: Vec<String>,
pub database_hash: Option<String>,
pub post_processing_tools: Vec<String>,
}Expand description
What a C or C++ translation unit was compiled with.
Fields§
§compiler: StringThe compiler as the database spells it.
compiler_version: Option<String>Its version, which only something that ran it can know.
linker: Option<String>The linker, for the variants that reach a link step.
macros: Vec<String>One entry per macro, in the flag form its last mention left it in
(-DNAME=value or -UNAME), sorted by macro name.
include_paths: Vec<String>Include directories in search order, without the -I.
flags: Vec<String>Everything else that was passed, in the order it was passed.
database_hash: Option<String>A hash of the compilation database this came from.
post_processing_tools: Vec<String>Post-processing tools declared for this build, in invocation order.
This is deliberately declarative. Source analysis never runs a tool in this list; artifact analysis may consume the recorded fact later.
Implementations§
Source§impl CppBuild
impl CppBuild
Sourcepub fn from_command(arguments: &[String], file: &Path) -> Self
pub fn from_command(arguments: &[String], file: &Path) -> Self
The identity of one entry of a compilation database.
file is the translation unit’s own source, which is dropped: it says
which unit this is, not which variant it belongs to.
Sourcepub fn from_command_in_directory(
arguments: &[String],
file: &Path,
directory: Option<&Path>,
) -> Self
pub fn from_command_in_directory( arguments: &[String], file: &Path, directory: Option<&Path>, ) -> Self
The identity of one entry of a compilation database whose command ran
from directory.
Relative input arguments are resolved from that directory before they
are compared with file, so translation-unit paths do not accidentally
become variant settings.
Trait Implementations§
impl Eq for CppBuild
impl StructuralPartialEq for CppBuild
Auto Trait Implementations§
impl Freeze for CppBuild
impl RefUnwindSafe for CppBuild
impl Send for CppBuild
impl Sync for CppBuild
impl Unpin for CppBuild
impl UnsafeUnpin for CppBuild
impl UnwindSafe for CppBuild
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.