File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ impl WorkspaceBuildScripts {
416
416
let path = dir_entry. path ( ) ;
417
417
tracing:: info!( "p{:?}" , path) ;
418
418
let extension = path. extension ( ) ?;
419
- if extension == "dll" || extension == "so" {
419
+ if extension == std :: env :: consts :: DLL_EXTENSION {
420
420
let name = path. file_stem ( ) ?. to_str ( ) ?. split_once ( '-' ) ?. 0 . to_owned ( ) ;
421
421
let path = AbsPathBuf :: try_from ( path) . ok ( ) ?;
422
422
return Some ( ( name, path) ) ;
@@ -426,10 +426,13 @@ impl WorkspaceBuildScripts {
426
426
} )
427
427
. collect ( ) ;
428
428
for p in rustc. packages ( ) {
429
- if let Some ( ( _, path) ) =
430
- proc_macro_dylibs. iter ( ) . find ( |( name, _) | * name == rustc[ p] . name )
431
- {
432
- bs. outputs [ p] . proc_macro_dylib_path = Some ( path. clone ( ) ) ;
429
+ let package = & rustc[ p] ;
430
+ if package. targets . iter ( ) . any ( |& it| rustc[ it] . is_proc_macro ) {
431
+ if let Some ( ( _, path) ) =
432
+ proc_macro_dylibs. iter ( ) . find ( |( name, _) | * name == package. name )
433
+ {
434
+ bs. outputs [ p] . proc_macro_dylib_path = Some ( path. clone ( ) ) ;
435
+ }
433
436
}
434
437
}
435
438
You can’t perform that action at this time.
0 commit comments