Skip to content

Commit fc32992

Browse files
Rollup merge of #141834 - Timmmm:user/timh/wasi, r=Noratrieb
Add unimplemented `current_dll_path()` for WASI This is the only change needed to Rust to allow compiling rustfmt for WASI (rustfmt uses some internal rustc crates).
2 parents b0b98a0 + bdd680f commit fc32992

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_session/src/filesearch.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ fn current_dll_path() -> Result<PathBuf, String> {
172172
Ok(OsString::from_wide(&filename).into())
173173
}
174174

175+
#[cfg(target_os = "wasi")]
176+
fn current_dll_path() -> Result<PathBuf, String> {
177+
Err("current_dll_path is not supported on WASI".to_string())
178+
}
179+
175180
pub fn sysroot_candidates() -> SmallVec<[PathBuf; 2]> {
176181
let target = crate::config::host_tuple();
177182
let mut sysroot_candidates: SmallVec<[PathBuf; 2]> = smallvec![get_or_default_sysroot()];

0 commit comments

Comments
 (0)