MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / builder_with_options

Function builder_with_options

cranelift/native/src/lib.rs:27–36  ·  view source on GitHub ↗

Return an `isa` builder configured for the current host machine, or `Err(())` if the host machine is not supported in the current configuration. Selects the given backend variant specifically; this is useful when more than one backend exists for a given target (e.g., on x86-64).

(infer_native_flags: bool)

Source from the content-addressed store, hash-verified

25/// useful when more than one backend exists for a given target
26/// (e.g., on x86-64).
27pub fn builder_with_options(infer_native_flags: bool) -> Result<isa::Builder, &'static str> {
28 let mut isa_builder = isa::lookup(Triple::host()).map_err(|err| match err {
29 isa::LookupError::SupportDisabled => "support for architecture disabled at compile time",
30 isa::LookupError::Unsupported => "unsupported architecture",
31 })?;
32 if infer_native_flags {
33 self::infer_native_flags(&mut isa_builder)?;
34 }
35 Ok(isa_builder)
36}
37
38/// Return an `isa` builder configured for the current host
39/// machine, or `Err(())` if the host machine is not supported

Callers 5

build_host_isaFunction · 0.85
with_host_isaMethod · 0.85
set_isa_flagsMethod · 0.85
builderFunction · 0.85
generateMethod · 0.85

Calls 3

infer_native_flagsFunction · 0.85
OkFunction · 0.85
lookupFunction · 0.50

Tested by 1

build_host_isaFunction · 0.68