@@ -82,26 +82,22 @@ fn disable_error_reporting<F: FnOnce() -> R, R>(f: F) -> R {
82
82
}
83
83
84
84
/// The platform-specific library name
85
- fn get_lib_name ( lib : & str , aux_type : AuxType ) -> Option < String > {
85
+ fn get_lib_name ( name : & str , aux_type : AuxType ) -> Option < String > {
86
86
match aux_type {
87
87
AuxType :: Bin => None ,
88
88
// In some cases (e.g. MUSL), we build a static
89
89
// library, rather than a dynamic library.
90
90
// In this case, the only path we can pass
91
91
// with '--extern-meta' is the '.rlib' file
92
- AuxType :: Lib => Some ( format ! ( "lib{}.rlib" , lib) ) ,
93
- AuxType :: Dylib => Some ( if cfg ! ( windows) {
94
- format ! ( "{}.dll" , lib)
95
- } else if cfg ! ( target_vendor = "apple" ) {
96
- format ! ( "lib{}.dylib" , lib)
97
- } else if cfg ! ( target_os = "aix" ) {
98
- format ! ( "lib{}.a" , lib)
99
- } else {
100
- format ! ( "lib{}.so" , lib)
101
- } ) ,
92
+ AuxType :: Lib => Some ( format ! ( "lib{name}.rlib" ) ) ,
93
+ AuxType :: Dylib => Some ( dylib_name ( name) ) ,
102
94
}
103
95
}
104
96
97
+ fn dylib_name ( name : & str ) -> String {
98
+ format ! ( "{}{name}.{}" , std:: env:: consts:: DLL_PREFIX , std:: env:: consts:: DLL_EXTENSION )
99
+ }
100
+
105
101
pub fn run ( config : Arc < Config > , testpaths : & TestPaths , revision : Option < & str > ) {
106
102
match & * config. target {
107
103
"arm-linux-androideabi"
0 commit comments