@@ -5,23 +5,23 @@ fn main() {
5
5
let target_vendor = env:: var ( "CARGO_CFG_TARGET_VENDOR" ) . unwrap_or_default ( ) ;
6
6
let target_os = env:: var ( "CARGO_CFG_TARGET_OS" ) . unwrap_or_default ( ) ;
7
7
let mut build256 = cc:: Build :: new ( ) ;
8
- let ( sha256_path, sha512_path) = if target_arch == "x86" {
9
- ( [ "src/sha256_x86.S" ] . iter ( ) , [ "src/sha512_x86.S" ] . iter ( ) )
8
+ let ( sha256_path, sha512_path) : ( & [ & str ] , & [ & str ] ) = if target_arch == "x86" {
9
+ ( & [ "src/sha256_x86.S" ] , & [ "src/sha512_x86.S" ] )
10
10
} else if target_arch == "x86_64" {
11
11
if target_os == "linux" {
12
12
(
13
- [ "src/sha256_x64_avx2.S" , "src/sha256_x64.S" ] . iter ( ) ,
14
- [ "src/sha512_x64_avx2.S" , "src/sha512_x64.S" ] . iter ( ) ,
13
+ & [ "src/sha256_x64_avx2.S" , "src/sha256_x64.S" ] ,
14
+ & [ "src/sha512_x64_avx2.S" , "src/sha512_x64.S" ] ,
15
15
)
16
16
} else {
17
- ( [ "src/sha256_x64.S" ] . iter ( ) , [ "src/sha512_x64.S" ] . iter ( ) )
17
+ ( & [ "src/sha256_x64.S" ] , & [ "src/sha512_x64.S" ] )
18
18
}
19
19
} else if target_arch == "aarch64" && target_vendor == "apple" {
20
20
build256. flag ( "-march=armv8-a+crypto" ) ;
21
- ( [ "src/sha256_aarch64_apple.S" ] . iter ( ) , [ "" ] . iter ( ) )
21
+ ( & [ "src/sha256_aarch64_apple.S" ] , & [ "" ] )
22
22
} else if target_arch == "aarch64" {
23
23
build256. flag ( "-march=armv8-a+crypto" ) ;
24
- ( [ "src/sha256_aarch64.S" ] . iter ( ) , [ "" ] . iter ( ) )
24
+ ( & [ "src/sha256_aarch64.S" ] , & [ "" ] )
25
25
} else {
26
26
panic ! ( "Unsupported target architecture" ) ;
27
27
} ;
0 commit comments