diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index 92f1bd8ab736..0e711890e076 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -172,6 +172,11 @@ fn current_dll_path() -> Result { Ok(OsString::from_wide(&filename).into()) } +#[cfg(target_os = "wasi")] +fn current_dll_path() -> Result { + Err("current_dll_path is not supported on WASI".to_string()) +} + pub fn sysroot_candidates() -> SmallVec<[PathBuf; 2]> { let target = crate::config::host_tuple(); let mut sysroot_candidates: SmallVec<[PathBuf; 2]> = smallvec![get_or_default_sysroot()];