@@ -106,7 +106,12 @@ pub fn prepare<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRe
106106 }
107107}
108108
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+ ) {
110115 let library_paths = output
111116 . library_paths
112117 . iter ( )
@@ -119,6 +124,7 @@ fn emit_build_output(state: &JobState<'_>, output: &BuildOutput, package_id: Pac
119124 linked_paths : & library_paths,
120125 cfgs : & output. cfgs ,
121126 env : & output. env ,
127+ out_dir,
122128 }
123129 . to_json_string ( ) ;
124130 state. stdout ( msg) ;
@@ -349,7 +355,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes
349355 BuildOutput :: parse ( & output. stdout , & pkg_name, & script_out_dir, & script_out_dir) ?;
350356
351357 if json_messages {
352- emit_build_output ( state, & parsed_output, id) ;
358+ emit_build_output ( state, & parsed_output, script_out_dir . as_path ( ) , id) ;
353359 }
354360 build_script_outputs
355361 . lock ( )
@@ -374,7 +380,7 @@ fn build_work<'a, 'cfg>(cx: &mut Context<'a, 'cfg>, unit: &Unit<'a>) -> CargoRes
374380 } ;
375381
376382 if json_messages {
377- emit_build_output ( state, & output, id) ;
383+ emit_build_output ( state, & output, script_out_dir . as_path ( ) , id) ;
378384 }
379385
380386 build_script_outputs
0 commit comments