File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -428,8 +428,9 @@ impl WorkspaceBuildScripts {
428428 for p in rustc.packages() {
429429 let package = &rustc[p];
430430 if package.targets.iter().any(|&it| rustc[it].is_proc_macro) {
431- if let Some((_, path)) =
432- proc_macro_dylibs.iter().find(|(name, _)| *name == package.name)
431+ if let Some((_, path)) = proc_macro_dylibs
432+ .iter()
433+ .find(|(name, _)| *name.trim_start_matches("lib") == package.name)
433434 {
434435 bs.outputs[p].proc_macro_dylib_path = Some(path.clone());
435436 }
Original file line number Diff line number Diff line change @@ -932,7 +932,7 @@ fn cargo_to_crate_graph(
932932 if has_private {
933933 // If the user provided a path to rustc sources, we add all the rustc_private crates
934934 // and create dependencies on them for the crates which opt-in to that
935- if let Some ( ( rustc_workspace, build_scripts ) ) = rustc {
935+ if let Some ( ( rustc_workspace, rustc_build_scripts ) ) = rustc {
936936 handle_rustc_crates (
937937 & mut crate_graph,
938938 & mut pkg_to_lib_crate,
@@ -945,7 +945,13 @@ fn cargo_to_crate_graph(
945945 & pkg_crates,
946946 & cfg_options,
947947 override_cfg,
948- build_scripts,
948+ if rustc_workspace. workspace_root ( ) == cargo. workspace_root ( ) {
949+ // the rustc workspace does not use the installed toolchain's proc-macro server
950+ // so we need to make sure we don't use the pre compiled proc-macros there either
951+ build_scripts
952+ } else {
953+ rustc_build_scripts
954+ } ,
949955 target_layout,
950956 ) ;
951957 }
You can’t perform that action at this time.
0 commit comments