@@ -233,15 +233,15 @@ fn rustc<'a, 'cfg>(
233
233
let extract_rendered_errors = if rmeta_produced {
234
234
match cx. bcx . build_config . message_format {
235
235
MessageFormat :: Json => {
236
- rustc. arg ( "-Zemit-directives " ) ;
236
+ rustc. arg ( "-Zemit-artifact-notifications " ) ;
237
237
false
238
238
}
239
239
MessageFormat :: Human => {
240
240
rustc
241
241
. arg ( "--error-format=json" )
242
242
. arg ( "--json-rendered=termcolor" )
243
243
. arg ( "-Zunstable-options" )
244
- . arg ( "-Zemit-directives " ) ;
244
+ . arg ( "-Zemit-artifact-notifications " ) ;
245
245
true
246
246
}
247
247
@@ -1119,7 +1119,7 @@ fn on_stderr_line(
1119
1119
}
1120
1120
1121
1121
// In some modes of execution we will execute rustc with `-Z
1122
- // emit-directives ` to look for metadata files being produced. When this
1122
+ // emit-artifact-notifications ` to look for metadata files being produced. When this
1123
1123
// happens we may be able to start subsequent compilations more quickly than
1124
1124
// waiting for an entire compile to finish, possibly using more parallelism
1125
1125
// available to complete a compilation session more quickly.
@@ -1128,16 +1128,16 @@ fn on_stderr_line(
1128
1128
// that a metadata file has been produced.
1129
1129
if look_for_metadata_directive {
1130
1130
#[ derive( serde:: Deserialize ) ]
1131
- struct CompilerDirective {
1132
- directive : String ,
1131
+ struct ArtifactNotification {
1132
+ artifact : String ,
1133
1133
}
1134
- if let Ok ( directive ) = serde_json:: from_str :: < CompilerDirective > ( compiler_message. get ( ) ) {
1135
- log:: trace!( "found directive from rustc: `{}`" , directive . directive ) ;
1136
- if directive . directive . starts_with ( "metadata file written ") {
1134
+ if let Ok ( artifact ) = serde_json:: from_str :: < ArtifactNotification > ( compiler_message. get ( ) ) {
1135
+ log:: trace!( "found directive from rustc: `{}`" , artifact . artifact ) ;
1136
+ if artifact . artifact . ends_with ( ".rmeta ") {
1137
1137
log:: debug!( "looks like metadata finished early!" ) ;
1138
1138
state. rmeta_produced ( ) ;
1139
- return Ok ( ( ) )
1140
1139
}
1140
+ return Ok ( ( ) )
1141
1141
}
1142
1142
}
1143
1143
0 commit comments