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 11use std:: env;
2- use std:: ffi:: OsStr ;
32
43pub fn build_zlib_ng ( target : & str , compat : bool ) {
54 let mut cmake = cmake:: Config :: new ( "src/zlib-ng" ) ;
@@ -19,10 +18,8 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
1918 // Check if we should pass on an explicit boolean value of the WITH_RVV build option.
2019 // See: https://github.com/zlib-ng/zlib-ng?tab=readme-ov-file#advanced-build-options
2120 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 ( ) )
2623 {
2724 Some ( "OFF" | "NO" | "FALSE" | "0" ) => {
2825 // 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