File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1
1
use std:: env;
2
- use std:: ffi:: OsStr ;
3
2
4
3
pub fn build_zlib_ng ( target : & str , compat : bool ) {
5
4
let mut cmake = cmake:: Config :: new ( "src/zlib-ng" ) ;
@@ -19,10 +18,8 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
19
18
// Check if we should pass on an explicit boolean value of the WITH_RVV build option.
20
19
// See: https://github.com/zlib-ng/zlib-ng?tab=readme-ov-file#advanced-build-options
21
20
match env:: var_os ( "RISCV_WITH_RVV" )
22
- . map ( OsStr :: to_str)
23
- . map ( str:: trim)
24
- . map ( str:: to_uppercase)
25
- . map ( Into :: into)
21
+ . and_then ( |v| v. to_str ( ) )
22
+ . map ( |s| s. trim ( ) . to_uppercase ( ) . as_ref ( ) )
26
23
{
27
24
Some ( "OFF" | "NO" | "FALSE" | "0" ) => {
28
25
// Force RVV off. This turns off RVV entirely, as well as the runtime check for it.
You can’t perform that action at this time.
0 commit comments