aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-28 10:29:09 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-28 10:29:09 -0700
commitfe95c55549380c2bb52a839f127886702d7f1f4a (patch)
tree6028b29621a940203677db5b6ab268079c846dde /Makefile
parent3deb97fe24eccb1245e9323475f10cfba705e08f (diff)
parente509b5b8be0f17467dcc75130f941d84a09d96a3 (diff)
downloadgit-fe95c55549380c2bb52a839f127886702d7f1f4a.tar.xz
Merge branch 'ps/ci-rust'
CI improvements to handle the recent Rust integration better. * ps/ci-rust: rust: support for Windows ci: verify minimum supported Rust version ci: check for common Rust mistakes via Clippy rust/varint: add safety comments ci: check formatting of our Rust code ci: deduplicate calls to `apt-get update`
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1919d35bf3..562e637fa0 100644
--- a/Makefile
+++ b/Makefile
@@ -927,10 +927,17 @@ export PYTHON_PATH
TEST_SHELL_PATH = $(SHELL_PATH)
LIB_FILE = libgit.a
+
ifdef DEBUG
-RUST_LIB = target/debug/libgitcore.a
+RUST_TARGET_DIR = target/debug
else
-RUST_LIB = target/release/libgitcore.a
+RUST_TARGET_DIR = target/release
+endif
+
+ifeq ($(uname_S),Windows)
+RUST_LIB = $(RUST_TARGET_DIR)/gitcore.lib
+else
+RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
endif
GITLIBS = common-main.o $(LIB_FILE)
@@ -1556,6 +1563,9 @@ ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)
ifdef WITH_RUST
BASIC_CFLAGS += -DWITH_RUST
GITLIBS += $(RUST_LIB)
+ifeq ($(uname_S),Windows)
+EXTLIBS += -luserenv
+endif
endif
ifdef SANITIZE