Skip to content

Commit

Permalink
Default to the native host for wasmtime compile (#6152)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton authored Apr 5, 2023
1 parent 34c282a commit 51e8eaf
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/commands/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use clap::Parser;
use once_cell::sync::Lazy;
use std::fs;
use std::path::PathBuf;
use target_lexicon::Triple;
use wasmtime::Engine;
use wasmtime_cli_flags::CommonOptions;

Expand Down Expand Up @@ -61,12 +60,7 @@ impl CompileCommand {
pub fn execute(mut self) -> Result<()> {
self.common.init_logging();

let target = self
.target
.take()
.unwrap_or_else(|| Triple::host().to_string());

let config = self.common.config(Some(&target))?;
let config = self.common.config(self.target.as_deref())?;

let engine = Engine::new(&config)?;

Expand Down

0 comments on commit 51e8eaf

Please sign in to comment.