]> Kevux Git Server - rit/commit
rust: add a build.rs script for tests
authorbrian m. carlson <sandals@crustytoothpaste.net>
Sat, 7 Feb 2026 20:04:42 +0000 (20:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 8 Feb 2026 01:41:03 +0000 (17:41 -0800)
commit3bb0b0afaba588c04982103534afa2aae922f5bf
tree2b210dea9696eb4714a96dabd6672087f691e517
parent41d1d14a18164c529cd80c8b6b2a75f31831df08
rust: add a build.rs script for tests

Cargo uses the build.rs script to determine how to compile and link a
binary.  The only binary we're generating, however, is for our tests,
but in a future commit, we're going to link against libgit.a for some
functionality and we'll need to make sure the test binaries are
complete.

Add a build.rs file for this case and specify the files we're going to
be linking against.  Because we cannot specify different dependencies
when building our static library versus our tests, update the Makefile
to specify these dependencies for our static library to avoid race
conditions during build.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
build.rs [new file with mode: 0644]