Default to the native host for wasmtime compile (#6152)
This commit updates the implementation of the `wasmtime compile` to use the native host as the default targeted output. Previously the string for the native host's target was used as the default target, but this notably disables CPU feature inference meaning that the baseline was always generated.
This commit is contained in:
@@ -5,7 +5,6 @@ use clap::Parser;
|
|||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use target_lexicon::Triple;
|
|
||||||
use wasmtime::Engine;
|
use wasmtime::Engine;
|
||||||
use wasmtime_cli_flags::CommonOptions;
|
use wasmtime_cli_flags::CommonOptions;
|
||||||
|
|
||||||
@@ -61,12 +60,7 @@ impl CompileCommand {
|
|||||||
pub fn execute(mut self) -> Result<()> {
|
pub fn execute(mut self) -> Result<()> {
|
||||||
self.common.init_logging();
|
self.common.init_logging();
|
||||||
|
|
||||||
let target = self
|
let config = self.common.config(self.target.as_deref())?;
|
||||||
.target
|
|
||||||
.take()
|
|
||||||
.unwrap_or_else(|| Triple::host().to_string());
|
|
||||||
|
|
||||||
let config = self.common.config(Some(&target))?;
|
|
||||||
|
|
||||||
let engine = Engine::new(&config)?;
|
let engine = Engine::new(&config)?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user