File tree 1 file changed +4
-11
lines changed
1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ pub type Result<T> = cargo::util::CargoResult<T>;
23
23
#[ derive( Debug , Deserialize ) ]
24
24
struct Invocation {
25
25
package_name : String ,
26
+ target_kind : Vec < String > ,
26
27
outputs : Vec < PathBuf > ,
27
28
}
28
29
@@ -436,18 +437,10 @@ impl<'a> WorkInfo<'a> {
436
437
437
438
// TODO: handle multiple outputs gracefully
438
439
for i in & build_plan. invocations {
439
- if i. package_name == name {
440
- // FIXME: this is a hack to avoid picking up output artifacts of
441
- // build scrits and build programs (no outputs):
442
- let build_script = i
443
- . outputs
444
- . iter ( )
445
- . any ( |v| v. to_str ( ) . unwrap ( ) . contains ( "build_script" ) ) ;
446
- let build_program = i. outputs . is_empty ( ) ;
447
- if build_script || build_program {
448
- continue ;
440
+ if let Some ( kind) = i. target_kind . get ( 0 ) {
441
+ if kind. contains ( "lib" ) && i. package_name == name {
442
+ return Ok ( ( i. outputs [ 0 ] . clone ( ) , compilation. deps_output ) ) ;
449
443
}
450
- return Ok ( ( i. outputs [ 0 ] . clone ( ) , compilation. deps_output ) ) ;
451
444
}
452
445
}
453
446
You can’t perform that action at this time.
0 commit comments