fix(docker): pass library search path via RUSTFLAGS for zig linker

cargo zigbuild's zig linker ignores LIBRARY_PATH; pass -L native=
through RUSTFLAGS so it can find libodbc.so during linking.
This commit is contained in:
t8y2 2026-05-07 18:40:42 +08:00
parent fbcceb5781
commit 63a32c816b
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ RUN case "$TARGETARCH" in \
LIBRARY_PATH="/usr/lib/$lib_arch" \
PKG_CONFIG_PATH="/usr/lib/$lib_arch/pkgconfig" \
PKG_CONFIG_SYSROOT_DIR="/" \
RUSTFLAGS="-L native=/usr/lib/$lib_arch" \
cargo zigbuild --release -p dbx-web --target "$rust_target" || true
# Copy real sources and rebuild (only application code recompiles)
@ -67,6 +68,7 @@ RUN case "$TARGETARCH" in \
LIBRARY_PATH="/usr/lib/$lib_arch" \
PKG_CONFIG_PATH="/usr/lib/$lib_arch/pkgconfig" \
PKG_CONFIG_SYSROOT_DIR="/" \
RUSTFLAGS="-L native=/usr/lib/$lib_arch" \
cargo zigbuild --release -p dbx-web --target "$rust_target" && \
mkdir -p "/out/linux/$TARGETARCH" && \
cp "/app/target/$rust_target/release/dbx-web" "/out/linux/$TARGETARCH/"