Fixed CI runner failure when executing tests

This commit is contained in:
Mick Grove 2026-02-13 10:04:18 -08:00
commit a36634c4b4
2 changed files with 10 additions and 2 deletions

View file

@ -143,8 +143,6 @@ ubuntu-x64: setup-zig # ensures Zig & cargo-zigbuild exist
@. $$HOME/.cargo/env && \
rustup target add x86_64-unknown-linux-musl && \
export PKG_CONFIG_ALLOW_CROSS=1 && \
export CFLAGS_x86_64_unknown_linux_musl="-DHAVE_UNISTD_H=1 -DHAVE_POSIX_MEMALIGN=1" && \
export CXXFLAGS_x86_64_unknown_linux_musl="-DHAVE_UNISTD_H=1 -DHAVE_POSIX_MEMALIGN=1" && \
cargo zigbuild --release --target x86_64-unknown-linux-musl
@echo "🗜️ Packaging archive …"

View file

@ -262,6 +262,16 @@ fn main() {
.define("BUILD_SVE2_BITPERM", "OFF");
}
// Under cargo-zigbuild for x86_64-unknown-linux-musl, Vectorscan's
// configure-time probes can incorrectly miss posix_memalign/unistd.
// Scope this workaround to musl targets only to avoid impacting
// unrelated native dependencies.
let target = env("TARGET");
if target.ends_with("-musl") {
cfg.define("HAVE_UNISTD_H", "1")
.define("HAVE_POSIX_MEMALIGN", "1");
}
let dst = cfg.build();
println!("cargo:rustc-link-lib=static=hs");
println!("cargo:rustc-link-search={}", dst.join("lib").display());