MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / main

Function main

cranelift/src/clif-util.rs:76–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74struct CompiledWithoutSupportOptions {}
75
76fn main() -> anyhow::Result<()> {
77 env_logger::init();
78
79 match Commands::parse() {
80 Commands::Cat(c) => cat::run(&c)?,
81 Commands::Run(r) => run::run(&r)?,
82 Commands::Interpret(i) => interpret::run(&i)?,
83 Commands::PrintCfg(p) => print_cfg::run(&p)?,
84 Commands::Compile(c) => compile::run(&c)?,
85 Commands::Bugpoint(b) => bugpoint::run(&b)?,
86
87 #[cfg(feature = "souper-harvest")]
88 Commands::SouperHarvest(s) => souper_harvest::run(&s)?,
89 #[cfg(not(feature = "souper-harvest"))]
90 Commands::SouperHarvest(_) => anyhow::bail!(
91 "Error: clif-util was compiled without support for the `souper-harvest` \
92 subcommand",
93 ),
94
95 Commands::Test(t) => {
96 cranelift_filetests::run(
97 t.verbose,
98 t.time_passes,
99 &t.files
100 .iter()
101 .map(|f| f.display().to_string())
102 .collect::<Vec<_>>(),
103 )?;
104 }
105 Commands::Pass(p) => {
106 cranelift_filetests::run_passes(
107 p.verbose,
108 p.time_passes,
109 &p.passes,
110 &p.target,
111 &p.file.display().to_string(),
112 )?;
113 }
114 }
115
116 Ok(())
117}
118
119#[test]
120fn verify_cli() {

Callers

nothing calls this directly

Calls 9

run_passesFunction · 0.85
OkFunction · 0.85
runFunction · 0.70
initFunction · 0.50
parseFunction · 0.50
mapMethod · 0.45
iterMethod · 0.45
to_stringMethod · 0.45
displayMethod · 0.45

Tested by

no test coverage detected