@@ -106,7 +106,12 @@ pub fn prepare<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRe
106
106
}
107
107
}
108
108
109
- fn emit_build_output ( state : & JobState < ' _ > , output : & BuildOutput , package_id : PackageId ) {
109
+ fn emit_build_output (
110
+ state : & JobState < ' _ > ,
111
+ output : & BuildOutput ,
112
+ out_dir : & Path ,
113
+ package_id : PackageId ,
114
+ ) {
110
115
let library_paths = output
111
116
. library_paths
112
117
. iter ( )
@@ -119,6 +124,7 @@ fn emit_build_output(state: &JobState<'_>, output: &BuildOutput, package_id: Pac
119
124
linked_paths : & library_paths,
120
125
cfgs : & output. cfgs ,
121
126
env : & output. env ,
127
+ out_dir,
122
128
}
123
129
. to_json_string ( ) ;
124
130
state. stdout ( msg) ;
@@ -349,7 +355,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes
349
355
BuildOutput :: parse ( & output. stdout , & pkg_name, & script_out_dir, & script_out_dir) ?;
350
356
351
357
if json_messages {
352
- emit_build_output ( state, & parsed_output, id) ;
358
+ emit_build_output ( state, & parsed_output, script_out_dir . as_path ( ) , id) ;
353
359
}
354
360
build_script_outputs
355
361
. lock ( )
@@ -374,7 +380,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes
374
380
} ;
375
381
376
382
if json_messages {
377
- emit_build_output ( state, & output, id) ;
383
+ emit_build_output ( state, & output, script_out_dir . as_path ( ) , id) ;
378
384
}
379
385
380
386
build_script_outputs
0 commit comments