diff --git a/lib/cli/src/store.rs b/lib/cli/src/store.rs index 4870e2dee72..a88e2ebd8d5 100644 --- a/lib/cli/src/store.rs +++ b/lib/cli/src/store.rs @@ -2,10 +2,9 @@ //! commands. use crate::common::WasmFeatures; -use anyhow::{Error, Result}; +use anyhow::Result; use clap::Clap; use std::path::PathBuf; -use std::str::FromStr; use std::string::ToString; #[allow(unused_imports)] use std::sync::Arc; @@ -36,15 +35,15 @@ pub struct StoreOptions { /// The compiler options pub struct CompilerOptions { /// Use Singlepass compiler. - #[clap(long, conflicts_with_all = &["cranelift", "llvm", "backend"])] + #[clap(long, conflicts_with_all = &["cranelift", "llvm"])] singlepass: bool, /// Use Cranelift compiler. - #[clap(long, conflicts_with_all = &["singlepass", "llvm", "backend"])] + #[clap(long, conflicts_with_all = &["singlepass", "llvm"])] cranelift: bool, /// Use LLVM compiler. - #[clap(long, conflicts_with_all = &["singlepass", "cranelift", "backend"])] + #[clap(long, conflicts_with_all = &["singlepass", "cranelift"])] llvm: bool, /// Enable compiler internal verification. @@ -55,10 +54,6 @@ pub struct CompilerOptions { #[clap(long, parse(from_os_str))] llvm_debug_dir: Option, - /// The deprecated backend flag - Please do not use - #[clap(long = "backend", hidden = true, conflicts_with_all = &["singlepass", "cranelift", "llvm"])] - backend: Option, - #[clap(flatten)] features: WasmFeatures, } @@ -72,12 +67,6 @@ impl CompilerOptions { Ok(CompilerType::LLVM) } else if self.singlepass { Ok(CompilerType::Singlepass) - } else if let Some(backend) = self.backend.clone() { - warning!( - "the `--backend={0}` flag is deprecated, please use `--{0}` instead", - backend - ); - CompilerType::from_str(&backend) } else { // Auto mode, we choose the best compiler for that platform cfg_if::cfg_if! { @@ -344,19 +333,6 @@ impl ToString for CompilerType { } } -impl FromStr for CompilerType { - type Err = Error; - fn from_str(s: &str) -> Result { - match s { - "singlepass" => Ok(Self::Singlepass), - "cranelift" => Ok(Self::Cranelift), - "llvm" => Ok(Self::LLVM), - "headless" => Ok(Self::Headless), - backend => bail!("The `{}` compiler does not exist.", backend), - } - } -} - /// The engine used for the store #[derive(Debug, PartialEq, Eq, Clone, Copy)] pub enum EngineType {