Skip to content

Commit 9fc5760

Browse files
committed
fix aarch windows
1 parent 0fd6b1b commit 9fc5760

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/rust.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
# Ensure consistent macOS deployment target across all compiled objects
12+
# (Rust, cc-compiled C code, and Zig-compiled zlob) to avoid linker warnings
13+
MACOSX_DEPLOYMENT_TARGET: "13"
1114

1215
jobs:
1316
test:
@@ -34,7 +37,7 @@ jobs:
3437
components: rustfmt, clippy
3538

3639
- name: Run tests
37-
run: cargo test --verbose
40+
run: cargo test --verbose --workspace --exclude fff-nvim
3841

3942
fmt:
4043
name: cargo fmt

crates/fff-c/src/ffi_types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! These types use #[repr(C)] for C ABI compatibility and implement
44
//! serde traits for JSON serialization.
55
6-
use std::ffi::{c_char, CString};
6+
use std::ffi::{CString, c_char};
77
use std::ptr;
88

99
use fff_core::git::format_git_status;

crates/fff-core/build.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ fn main() {
22
// On Windows MSVC, explicitly link the C runtime libraries.
33
// This is needed because Zig-compiled static libraries (zlob) don't emit
44
// /DEFAULTLIB directives for the MSVC CRT. Without this, symbols like
5-
// strcmp, memcpy etc. from vendored C libraries (libgit2, lmdb) are
6-
// unresolved when linking the cdylib.
5+
// strcmp, memcpy, memchr etc. from vendored C libraries (libgit2, lmdb)
6+
// are unresolved when linking the cdylib.
7+
//
8+
// We link both msvcrt (classic CRT) and ucrt (Universal CRT where memchr,
9+
// strcmp etc. live on newer MSVC/ARM64 targets).
710
let target = std::env::var("TARGET").unwrap_or_default();
811
if target.contains("windows") && target.contains("msvc") {
912
println!("cargo:rustc-link-lib=msvcrt");
13+
println!("cargo:rustc-link-lib=ucrt");
14+
println!("cargo:rustc-link-lib=vcruntime");
1015
}
1116
}

0 commit comments

Comments
 (0)