[−][src]Struct cranelift_object::ObjectBuilder
A builder for ObjectBackend
.
Implementations
impl ObjectBuilder
[src]
pub fn new<V: Into<Vec<u8>>>(
isa: Box<dyn TargetIsa>,
name: V,
libcall_names: Box<dyn Fn(LibCall) -> String>
) -> ModuleResult<Self>
[src]
isa: Box<dyn TargetIsa>,
name: V,
libcall_names: Box<dyn Fn(LibCall) -> String>
) -> ModuleResult<Self>
Create a new ObjectBuilder
using the given Cranelift target, that
can be passed to Module::new
.
The libcall_names
function provides a way to translate cranelift_codegen
's ir::LibCall
enum to symbols. LibCalls are inserted in the IR as part of the legalization for certain
floating point instructions, and for stack probes. If you don't know what to use for this
argument, use cranelift_module::default_libcall_names()
.
pub fn function_alignment(&mut self, alignment: u64) -> &mut Self
[src]
Set the alignment used for functions.
pub fn per_function_section(&mut self, per_function_section: bool) -> &mut Self
[src]
Set if every function should end up in their own section.
Auto Trait Implementations
impl !RefUnwindSafe for ObjectBuilder
impl !Send for ObjectBuilder
impl !Sync for ObjectBuilder
impl Unpin for ObjectBuilder
impl !UnwindSafe for ObjectBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,