From 51e8eafff2b0bb2a10efb1452a23c4c9feff4261 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 5 Apr 2023 11:25:38 -0500 Subject: [PATCH] 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. --- src/commands/compile.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/commands/compile.rs b/src/commands/compile.rs index 2ee93eb033..bf6c30801d 100644 --- a/src/commands/compile.rs +++ b/src/commands/compile.rs @@ -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; @@ -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)?;