Auto merge of #16247 - Veykril:opqueues, r=Veykril

fix: Fix build scripts not being rebuilt in some occasions

Also makes proc-macro changed flag setting async, we don't wanna block `process_changes` on the database as that is on the main thread!
This commit is contained in:
bors 2024-02-14 14:33:16 +00:00
commit 3bb8d3a32f
16 changed files with 121 additions and 77 deletions

View file

@ -24,7 +24,7 @@ use toolchain::Tool;
use crate::{
cfg_flag::CfgFlag, utf8_stdout, CargoConfig, CargoFeatures, CargoWorkspace, InvocationLocation,
InvocationStrategy, Package, Sysroot,
InvocationStrategy, Package, Sysroot, TargetKind,
};
#[derive(Debug, Default, Clone, PartialEq, Eq)]
@ -467,7 +467,11 @@ impl WorkspaceBuildScripts {
.collect();
for p in rustc.packages() {
let package = &rustc[p];
if package.targets.iter().any(|&it| rustc[it].is_proc_macro) {
if package
.targets
.iter()
.any(|&it| matches!(rustc[it].kind, TargetKind::Lib { is_proc_macro: true }))
{
if let Some((_, path)) = proc_macro_dylibs
.iter()
.find(|(name, _)| *name.trim_start_matches("lib") == package.name)