pub struct LLVM { /* private fields */ }
Implementations§
Source§impl LLVM
impl LLVM
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new configuration object with the default configuration specified.
Sourcepub fn canonicalize_nans(&mut self, enable: bool) -> &mut Self
pub fn canonicalize_nans(&mut self, enable: bool) -> &mut Self
Enable NaN canonicalization.
NaN canonicalization is useful when trying to run WebAssembly deterministically across different architectures.
Sourcepub fn opt_level(&mut self, opt_level: LLVMOptLevel) -> &mut Self
pub fn opt_level(&mut self, opt_level: LLVMOptLevel) -> &mut Self
The optimization levels when optimizing the IR.
Sourcepub fn callbacks(
&mut self,
callbacks: Option<Arc<dyn LLVMCallbacks>>,
) -> &mut Self
pub fn callbacks( &mut self, callbacks: Option<Arc<dyn LLVMCallbacks>>, ) -> &mut Self
Callbacks that will triggered in the different compilation phases in LLVM.
Sourcepub fn target_machine(&self, target: &Target) -> TargetMachine
pub fn target_machine(&self, target: &Target) -> TargetMachine
Generates the target machine for the current target
Trait Implementations§
Source§impl CompilerConfig for LLVM
impl CompilerConfig for LLVM
Source§fn enable_pic(&mut self)
fn enable_pic(&mut self)
Emit code suitable for dlopen.
Source§fn enable_verifier(&mut self)
fn enable_verifier(&mut self)
Whether to verify compiler IR.
Source§fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
fn push_middleware(&mut self, middleware: Arc<dyn ModuleMiddleware>)
Pushes a middleware onto the back of the middleware chain.
Source§fn default_features_for_target(&self, _target: &Target) -> Features
fn default_features_for_target(&self, _target: &Target) -> Features
Gets the default features for this compiler in the given target
Auto Trait Implementations§
impl Freeze for LLVM
impl !RefUnwindSafe for LLVM
impl Send for LLVM
impl Sync for LLVM
impl Unpin for LLVM
impl !UnwindSafe for LLVM
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more