diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-06-01 19:35:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-01 19:35:45 +0200 |
| commit | fc32992a00b1a261dfe12eed2bbd9dc91cab41b5 (patch) | |
| tree | f93a233bfb938432cb48a408f3f4187c7be8ca9d | |
| parent | b0b98a078de9ea850675bdfaa26e38823fe24158 (diff) | |
| parent | bdd680ffd15e5e9672d0a82e363d8193e575a132 (diff) | |
| download | rust-fc32992a00b1a261dfe12eed2bbd9dc91cab41b5.tar.gz rust-fc32992a00b1a261dfe12eed2bbd9dc91cab41b5.zip | |
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).
| -rw-r--r-- | compiler/rustc_session/src/filesearch.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index 92f1bd8ab73..0e711890e07 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -172,6 +172,11 @@ fn current_dll_path() -> Result<PathBuf, String> { Ok(OsString::from_wide(&filename).into()) } +#[cfg(target_os = "wasi")] +fn current_dll_path() -> Result<PathBuf, String> { + 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()]; |
