fix: Fix rustc proc-macro handling being broken on the rustc workspace itself

This commit is contained in:
Lukas Wirth 2023-03-14 11:33:40 +01:00
parent aaf08bdcc5
commit 88f0fe784f
2 changed files with 11 additions and 4 deletions

View file

@ -428,8 +428,9 @@ impl WorkspaceBuildScripts {
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 == package.name)
if let Some((_, path)) = proc_macro_dylibs
.iter()
.find(|(name, _)| *name.trim_start_matches("lib") == package.name)
{
bs.outputs[p].proc_macro_dylib_path = Some(path.clone());
}