Skip to content

Commit

Permalink
What
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Jan 17, 2024
1 parent f889474 commit db64272
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build_zng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
cfg.define("X86_FEATURES", None);
cfg.file("src/zlib-ng/arch/x86/x86_features.c");

let is_64 = arch.as_str() == "x86_64";

let pclmulqdq = {
let mut ctx = Ctx {
cfg: &mut cfg,
Expand All @@ -365,7 +367,7 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
check: "sse2",
defines: &["X86_SSE2"],
flags: &["-msse2"],
msvc_flags: &["/arch:SSE2"],
msvc_flags: if is_64 { &[] } else { &["/arch:SSE2"] },
files: &["chunkset_sse2", "compare256_sse2", "slide_hash_sse2"],
}) {
if arch != "x86_64" {
Expand Down Expand Up @@ -569,6 +571,7 @@ pub fn build_zlib_ng(target: &str, compat: bool) {
&include.join(zlib_h),
|line| {
if line.contains("ZLIBNG_VERSION") {
eprintln!("cargo:warning=uhm what '{line}'");
version = Some(line.split('"').nth(1).unwrap().to_owned());
}
},
Expand Down

0 comments on commit db64272

Please sign in to comment.