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

Method compiler_target

crates/wasmtime/src/config.rs:2475–2489  ·  view source on GitHub ↗

Returns the configured compiler target for this `Config`.

(&self)

Source from the content-addressed store, hash-verified

2473
2474 /// Returns the configured compiler target for this `Config`.
2475 pub(crate) fn compiler_target(&self) -> target_lexicon::Triple {
2476 // If a target is explicitly configured, always use that.
2477 if let Some(target) = self.target.clone() {
2478 return target;
2479 }
2480
2481 // If the `build.rs` script determined that this platform uses pulley by
2482 // default, then use Pulley.
2483 if cfg!(default_target_pulley) {
2484 return target_lexicon::Triple::pulley_host();
2485 }
2486
2487 // And at this point the target is for sure the host.
2488 target_lexicon::Triple::host()
2489 }
2490
2491 /// Returns `true` if any of the `gc_heap_*` tunables have been explicitly
2492 /// configured.

Callers 5

validateMethod · 0.80
build_compilerMethod · 0.80
targetMethod · 0.80

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected