We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66df3f5 commit a1b2d3dCopy full SHA for a1b2d3d
zng/cmake.rs
@@ -1,5 +1,4 @@
1
use std::env;
2
-use std::ffi::OsStr;
3
4
pub fn build_zlib_ng(target: &str, compat: bool) {
5
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
// See: https://github.com/zlib-ng/zlib-ng?tab=readme-ov-file#advanced-build-options
21
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)
+ .and_then(|v| v.to_str())
+ .map(|s| s.trim().to_uppercase().as_ref())
26
{
27
Some("OFF" | "NO" | "FALSE" | "0") => {
28
// Force RVV off. This turns off RVV entirely, as well as the runtime check for it.
0 commit comments