mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Always emit rmeta when timings are enable to visualize codegen everywhere.
This commit is contained in:
parent
8bfae2d999
commit
911a9b0904
@ -121,7 +121,6 @@ impl<'a> JobState<'a> {
|
||||
/// This should only be called once because a metadata file can only be
|
||||
/// produced once!
|
||||
pub fn rmeta_produced(&self) {
|
||||
assert!(self.rmeta_required.get());
|
||||
self.rmeta_required.set(false);
|
||||
let _ = self
|
||||
.tx
|
||||
|
@ -698,10 +698,11 @@ fn add_error_format_and_color(
|
||||
// prettily, and then when parsing JSON messages from rustc we need to
|
||||
// internally understand that we should extract the `rendered` field and
|
||||
// present it if we can.
|
||||
if cx.bcx.build_config.cache_messages() || pipelined {
|
||||
let wants_artifacts = pipelined || cx.bcx.config.cli_unstable().timings.is_some();
|
||||
if cx.bcx.build_config.cache_messages() || wants_artifacts {
|
||||
cmd.arg("--error-format=json");
|
||||
let mut json = String::from("--json=diagnostic-rendered-ansi");
|
||||
if pipelined {
|
||||
if wants_artifacts {
|
||||
json.push_str(",artifacts");
|
||||
}
|
||||
match cx.bcx.build_config.message_format {
|
||||
@ -1075,7 +1076,8 @@ struct OutputOptions {
|
||||
|
||||
impl OutputOptions {
|
||||
fn new<'a>(cx: &Context<'a, '_>, unit: &Unit<'a>) -> OutputOptions {
|
||||
let look_for_metadata_directive = cx.rmeta_required(unit);
|
||||
let look_for_metadata_directive =
|
||||
cx.rmeta_required(unit) || cx.bcx.config.cli_unstable().timings.is_some();
|
||||
let color = cx.bcx.config.shell().supports_color();
|
||||
let cache_cell = if cx.bcx.build_config.cache_messages() {
|
||||
let path = cx.files().message_cache_path(unit);
|
||||
|
Loading…
x
Reference in New Issue
Block a user