Auto merge of #14287 - Veykril:rustc_private-proc-macro, r=Veykril
minor: Fixup dylib extensions for rustc_private proc-macro loading Follow up to https://github.com/rust-lang/rust-analyzer/pull/14282
This commit is contained in:
commit
38e9a110d4
@ -416,7 +416,7 @@ pub(crate) fn rustc_crates(
|
||||
let path = dir_entry.path();
|
||||
tracing::info!("p{:?}", path);
|
||||
let extension = path.extension()?;
|
||||
if extension == "dll" || extension == "so" {
|
||||
if extension == std::env::consts::DLL_EXTENSION {
|
||||
let name = path.file_stem()?.to_str()?.split_once('-')?.0.to_owned();
|
||||
let path = AbsPathBuf::try_from(path).ok()?;
|
||||
return Some((name, path));
|
||||
@ -426,12 +426,15 @@ pub(crate) fn rustc_crates(
|
||||
})
|
||||
.collect();
|
||||
for p in rustc.packages() {
|
||||
let package = &rustc[p];
|
||||
if package.targets.iter().any(|&it| rustc[it].is_proc_macro) {
|
||||
if let Some((_, path)) =
|
||||
proc_macro_dylibs.iter().find(|(name, _)| *name == rustc[p].name)
|
||||
proc_macro_dylibs.iter().find(|(name, _)| *name == package.name)
|
||||
{
|
||||
bs.outputs[p].proc_macro_dylib_path = Some(path.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if tracing::enabled!(tracing::Level::INFO) {
|
||||
for package in rustc.packages() {
|
||||
|
Loading…
Reference in New Issue
Block a user