Skip to content

Commit d76bc6d

Browse files
committed
Also recognize an environment variable
To aid in testing, and possibly as something that should even be kept in some form, this checks if an `RVV_OFF` environment variable is set and, if so, behaves as though the `rvv-off` feature is enabled, whether that feature is actually enabled or not.
1 parent 3a1ea59 commit d76bc6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zng/cmake.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
1414
.define("WITH_DFLTCC_INFLATE", "1")
1515
.cflag("-DDFLTCC_LEVEL_MASK=0x7e");
1616
}
17-
if cfg!(feature = "rvv-off") && target.contains("riscv64") {
17+
if target.contains("riscv64") && (cfg!(feature = "rvv-off") || env::var_os("RVV_OFF").is_some()) {
1818
cmake.define("WITH_RVV", "OFF");
1919
}
2020
if target == "i686-pc-windows-msvc" {

0 commit comments

Comments
 (0)