ClangWrapper

Struct ClangWrapper 

Source
pub struct ClangWrapper { /* private fields */ }

Implementations§

Source§

impl ClangWrapper

Source

pub fn new(name: &str, compiler_kind: CompilerKind) -> Self

Trait Implementations§

Source§

impl CompilerWrapper for ClangWrapper

Source§

fn name(&self) -> &str

Obtain the name of the wrapper
Source§

fn wrapped_compiler(&self) -> &Path

Obtain the path to the wrapped compiler
Source§

fn compiler_kind(&self) -> &CompilerKind

Obtain the compiler kind
Source§

fn parse_args<S>(&mut self, args: &[S]) -> Result<&mut Self, Error>
where S: AsRef<str>,

Set the wrapper arguments parsing a command line set of arguments
Source§

fn args(&self) -> &CompilerArgsInfo

Obtain the argument information
Source§

fn silence(&mut self, value: bool) -> &mut Self

Silences the compiler wrapper output
Source§

fn is_silent(&self) -> bool

Returns true if silence was called with true
Source§

fn command(&self) -> Result<Vec<String>, Error>

Command to run the compiler
Source§

fn run(&mut self) -> Result<Option<i32>, Error>

Run the compiler
Source§

fn execute_command<S>( &self, args: &[S], mode: CompileMode, ) -> Result<Option<i32>, Error>
where S: AsRef<OsStr> + Debug,

Source§

fn build_target(&self) -> Result<Option<i32>, Error>

Execute the given command and build the target
Source§

fn generate_bitcode_files_and_embed_filepaths( &self, ) -> Result<Option<i32>, Error>

Generate bitcode files for all input files
Source§

fn generate_bitcode_file<P>( &self, src_filepath: P, bitcode_filepath: P, ) -> Result<Option<i32>, Error>
where P: AsRef<Path>,

Generate bitcode file for one input file
Source§

fn build_object_file<P>( &self, src_filepath: P, object_filepath: P, ) -> Result<Option<i32>, Error>
where P: AsRef<Path>,

Execute the command and build the object file
Source§

impl Debug for ClangWrapper

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.