Artifact::Metadata => self.timings.unit_rmeta_finished(id, unlocked),
}
if unit.is_std && unit.kind == super::Kind::Target && !cx.bcx.build_config.build_plan {
+ // This is a bit of an unusual place to copy files around, and
+ // ideally this would be somewhere like the Work closure
+ // (`link_targets`). The tricky issue is handling rmeta files for
+ // pipelining. Since those are emitted asynchronously, the code
+ // path (like `on_stderr_line`) does not have enough information
+ // to know where the sysroot is, and that it is an std unit. If
+ // possible, it might be nice to eventually move this to the
+ // worker thread, but may be tricky to have the paths available.
+ // Another possibility is to disable pipelining between std ->
+ // non-std. The pipelining opportunities are small, and are not a
+ // huge win (in a full build, only proc_macro overlaps for 2
+ // seconds out of a 90s build on my system). Care must also be
+ // taken to properly copy these artifacts for Fresh units.
let rmeta = artifact == Artifact::Metadata;
standard_lib::add_sysroot_artifact(cx, unit, rmeta)?;
}