Remove the wasmtime wasm2obj command (#3301)
* Remove the `wasmtime wasm2obj` command This commit removes the `wasm2obj` subcommand of the `wasmtime` CLI. This subcommand has a very long history and dates back quite far. While it's existed, however, it's never been documented in terms of the output it's produced. AFAIK it's only ever been used for debugging to see the machine code output of Wasmtime on some modules. With recent changes to the module serialization output the output of `wasmtime compile`, the `*.cwasm` file, is now a native ELF file which can be fed to standard tools like `objdump`. Consequently I dont think there's any remaining need to keep `wasm2obj` around itself, so this commit removes the subcommand. * More code to delete * Try to fix debuginfo tests
This commit is contained in:
@@ -94,17 +94,13 @@ lazy_static::lazy_static! {
|
||||
}
|
||||
|
||||
pub mod commands;
|
||||
mod obj;
|
||||
|
||||
use anyhow::{bail, Result};
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
use structopt::StructOpt;
|
||||
use target_lexicon::Triple;
|
||||
use wasmtime::{Config, ProfilingStrategy, Strategy};
|
||||
|
||||
pub use obj::compile_to_obj;
|
||||
|
||||
fn pick_compilation_strategy(cranelift: bool, lightbeam: bool) -> Result<Strategy> {
|
||||
Ok(match (lightbeam, cranelift) {
|
||||
(true, false) => Strategy::Lightbeam,
|
||||
@@ -528,11 +524,6 @@ fn parse_cranelift_flag(name_and_value: &str) -> Result<(String, String)> {
|
||||
Ok((name, value))
|
||||
}
|
||||
|
||||
fn parse_target(s: &str) -> Result<Triple> {
|
||||
use std::str::FromStr;
|
||||
Triple::from_str(&s).map_err(|e| anyhow::anyhow!(e))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user