File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,6 @@ impl<'a> JobState<'a> {
121
121
/// This should only be called once because a metadata file can only be
122
122
/// produced once!
123
123
pub fn rmeta_produced ( & self ) {
124
- assert ! ( self . rmeta_required. get( ) ) ;
125
124
self . rmeta_required . set ( false ) ;
126
125
let _ = self
127
126
. tx
Original file line number Diff line number Diff line change @@ -698,10 +698,11 @@ fn add_error_format_and_color(
698
698
// prettily, and then when parsing JSON messages from rustc we need to
699
699
// internally understand that we should extract the `rendered` field and
700
700
// present it if we can.
701
- if cx. bcx . build_config . cache_messages ( ) || pipelined {
701
+ let wants_artifacts = pipelined || cx. bcx . config . cli_unstable ( ) . timings . is_some ( ) ;
702
+ if cx. bcx . build_config . cache_messages ( ) || wants_artifacts {
702
703
cmd. arg ( "--error-format=json" ) ;
703
704
let mut json = String :: from ( "--json=diagnostic-rendered-ansi" ) ;
704
- if pipelined {
705
+ if wants_artifacts {
705
706
json. push_str ( ",artifacts" ) ;
706
707
}
707
708
match cx. bcx . build_config . message_format {
@@ -1075,7 +1076,8 @@ struct OutputOptions {
1075
1076
1076
1077
impl OutputOptions {
1077
1078
fn new < ' a > ( cx : & Context < ' a , ' _ > , unit : & Unit < ' a > ) -> OutputOptions {
1078
- let look_for_metadata_directive = cx. rmeta_required ( unit) ;
1079
+ let look_for_metadata_directive =
1080
+ cx. rmeta_required ( unit) || cx. bcx . config . cli_unstable ( ) . timings . is_some ( ) ;
1079
1081
let color = cx. bcx . config . shell ( ) . supports_color ( ) ;
1080
1082
let cache_cell = if cx. bcx . build_config . cache_messages ( ) {
1081
1083
let path = cx. files ( ) . message_cache_path ( unit) ;
You can’t perform that action at this time.
0 commit comments