Skip to content

Commit 043dc79

Browse files
committed
ci: disable musl crt-static for Test (Linux x64 musl) job
vite-task PR voidzero-dev/vite-task#344 made `fspy_preload_unix` (a cdylib) an unconditional build-dep so cargo's artifact resolver doesn't panic during cross-compile. On musl, building a cdylib requires dynamically-linked libc; the default is static, so the build fails with: error: cannot produce cdylib for `fspy_preload_unix` as the target `x86_64-unknown-linux-musl` does not support these crate types Mirror vite-task's own musl CI: set `-C target-feature=-crt-static` in `RUSTFLAGS`. vite+ ships as a NAPI module that links musl libc dynamically, so this matches production.
1 parent 7d70895 commit 043dc79

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ jobs:
121121
# Pin Rust tooling paths to avoid $HOME mismatch issues.
122122
CARGO_HOME: /root/.cargo
123123
RUSTUP_HOME: /root/.rustup
124+
# `-crt-static`: vite-task's `fspy_preload_unix` cdylib (unconditional
125+
# build-dep since voidzero-dev/vite-task#344) can't link against a
126+
# static musl libc. vite+ ships as a NAPI module that links musl libc
127+
# dynamically anyway, so matching here is correct.
128+
# Must mirror `.cargo/config.toml` rustflags — RUSTFLAGS env overrides
129+
# both [build] and [target.*] levels.
130+
RUSTFLAGS: --cfg tokio_unstable -C link-args=-Wl,--warn-unresolved-symbols -C target-feature=-crt-static
124131
steps:
125132
- name: Install Alpine dependencies
126133
shell: sh {0}

0 commit comments

Comments
 (0)