Merge branch 'jc/rust-cargo-build-target' into next

When cross-compiling with Cargo, the output artifact is placed in a
target-specific subdirectory, which causes the build system to fail
to locate it.  The build system has been updated to respect the
'CARGO_BUILD_TARGET' environment variable.

* jc/rust-cargo-build-target:
  rust: respect CARGO_BUILD_TARGET when locating build output
next
Junio C Hamano 2026-09-15 11:09:26 -07:00
commit e01fbae88c
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ then
exit $RET
fi

if ! cmp "$BUILD_DIR/$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" >/dev/null 2>&1
if ! cmp "$BUILD_DIR/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a" >/dev/null 2>&1
then
cp "$BUILD_DIR/$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a"
cp "$BUILD_DIR/${CARGO_BUILD_TARGET:+$CARGO_BUILD_TARGET/}$BUILD_TYPE/$LIBNAME" "$BUILD_DIR/libgitcore.a"
fi