]> git.ipfire.org Git - thirdparty/git.git/commit
rust: add a build.rs script for tests
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 17 Nov 2025 22:16:17 +0000 (22:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Nov 2025 22:24:15 +0000 (14:24 -0800)
commitddeec7a34fd355e65cf7d1d111833aba77d122c5
treea4ea9a51203fcd19ad38176580addb70c8a7ec02
parentf29070cb25863cdff181c5cd1f5f9ad6a0c1caed
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]