()
| 201 | } |
| 202 | |
| 203 | fn find_repo_root() -> PathBuf { |
| 204 | let mut dir = env::current_dir().expect("failed to get cwd"); |
| 205 | loop { |
| 206 | if dir.join("Cargo.toml").exists() && dir.join("crates").exists() { |
| 207 | return dir; |
| 208 | } |
| 209 | if !dir.pop() { |
| 210 | eprintln!("error: could not find wasmtime repo root"); |
| 211 | std::process::exit(1); |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | fn find_llvm_tool(name: &str) -> PathBuf { |
| 217 | let output = Command::new("rustc") |