git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Makefile: link osxkeychain helper against Rust

From
SGShardul Natu via GitGitGadget <gitgitgadget@gmail.com>
Date
May 5, 2026, 17:26 UTC
Message-ID
<pull.2288.git.git.1778001976709.gitgitgadget@gmail.com>
From: Shnatu <snatu@google.com>

When Rust is enabled, ensure that the git-credential-osxkeychain helper is linked with the necessary Rust libraries.

Introduce the RUST_LIBS variable inside ifndef NO_RUST block to hold the Rust library dependency, and use it in the helper's build target. This cleanly handles cases where Rust is disabled, making it a no-op and avoiding any build failures on systems without Cargo.

This addresses reviewer feedback from internal CL 910223487 by simplifying the variables and avoiding confusing "LINK" terminology.

Signed-off-by: Shnatu <snatu@google.com>
---
    Makefile: link osxkeychain helper against Rust
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2288%2Fkiranani%2Fnext-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2288/kiranani/next-v1
Pull-Request: https://github.com/git/git/pull/2288
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index f86173f93a..a17dca22b1 100644
--- a/Makefile
+++ b/Makefile
@@ -1593,6 +1593,7 @@ ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)
 ifndef NO_RUST
 BASIC_CFLAGS += -DWITH_RUST
 GITLIBS += $(RUST_LIB)
+RUST_LIBS = $(RUST_LIB)
 ifeq ($(uname_S),Windows)
 EXTLIBS += -luserenv
 endif
@@ -4082,9 +4083,9 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
 contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
 	$(AR) $(ARFLAGS) $@ $^
 
-contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS
+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) $(RUST_LIBS) GIT-LDFLAGS
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
-		$(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation
+		$(filter %.o,$^) $(LIB_FILE) $(RUST_LIBS) $(EXTLIBS) -framework Security -framework CoreFoundation
 
 contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS
 	$(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<

base-commit: 4f69b47b940100b02630f745a52f9d9850f122b2
-- 
gitgitgadget
Next: Kristoffer Haugsbakk
Message 1 of 46 in “Makefile: link osxkeychain helper against Rust”
  1. Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, May 5, 2026
  2. Kristoffer HaugsbakkMay 5, 2026
  3. ShnatuMay 7, 2026
  4. Junio C HamanoMay 8, 2026
  5. Koji NakamaruMay 8, 2026
  6. ShnatuMay 8, 2026
  7. Makefile: link osxkeychain & support universal RustShardul Natu via GitGitGadget, Jul 1, 2026
  8. Junio C HamanoJul 2, 2026
  9. Patrick SteinhardtJul 2, 2026
  10. Shardul NatuJul 2, 2026
  11. Patrick SteinhardtJul 3, 2026
  12. lipo availability [was: [PATCH v2] Makefile: link osxkeychain & support universal Rust]Ben Knoble, Jul 3, 2026
  13. 0/2 Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, Jul 2, 2026
  14. 1/2 Makefile: add $(RUST_LIB) prerequisite to osxkeychainShardul Natu via GitGitGadget, Jul 2, 2026
  15. 2/2 Makefile: support universal macOS builds via RUST_TARGETSShardul Natu via GitGitGadget, Jul 2, 2026
  16. Junio C HamanoJul 3, 2026
  17. Shardul NatuJul 3, 2026
  18. 0/2 Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, Jul 4, 2026
  19. 1/2 Makefile: add $(RUST_LIB) prerequisite to osxkeychainShardul Natu via GitGitGadget, Jul 4, 2026
  20. Patrick SteinhardtJul 6, 2026
  21. 2/2 Makefile: support universal macOS builds via RUST_TARGETSShardul Natu via GitGitGadget, Jul 4, 2026
  22. Patrick SteinhardtJul 6, 2026
  23. Junio C HamanoJul 5, 2026
  24. Shardul NatuJul 5, 2026
  25. 0/2 Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, Jul 6, 2026
  26. 1/2 Makefile: add $(GITLIBS) prerequisite to osxkeychainShardul Natu via GitGitGadget, Jul 6, 2026
  27. Junio C HamanoJul 6, 2026
  28. ShnatuJul 7, 2026
  29. ShnatuJul 7, 2026
  30. Shardul NatuJul 8, 2026
  31. 2/2 Makefile: support universal macOS builds via RUST_TARGETSShardul Natu via GitGitGadget, Jul 6, 2026
  32. 0/3 Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, Jul 6, 2026
  33. 1/3 Makefile: add $(RUST_LIB) prerequisite to osxkeychainShardul Natu via GitGitGadget, Jul 6, 2026
  34. 2/3 Makefile: support universal macOS builds via RUST_TARGETSShardul Natu via GitGitGadget, Jul 6, 2026
  35. 3/3 contrib: wire up osxkeychain in contrib/Makefile on macOSShardul Natu via GitGitGadget, Jul 6, 2026
  36. 0/3 Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, Jul 7, 2026
  37. 1/3 Makefile: add $(RUST_LIB) prerequisite to osxkeychainShardul Natu via GitGitGadget, Jul 7, 2026
  38. 2/3 Makefile: support universal macOS builds via RUST_TARGETSShardul Natu via GitGitGadget, Jul 7, 2026
  39. 3/3 contrib: wire up osxkeychain in contrib/Makefile on macOSShardul Natu via GitGitGadget, Jul 7, 2026
  40. Junio C HamanoJul 8, 2026
  41. Junio C HamanoJul 7, 2026
  42. 0/3 Makefile: link osxkeychain helper against RustShardul Natu via GitGitGadget, Jul 8, 2026
  43. 1/3 Makefile: add $(RUST_LIB) prerequisite to osxkeychainShardul Natu via GitGitGadget, Jul 8, 2026
  44. 2/3 Makefile: support universal macOS builds via RUST_TARGETSShardul Natu via GitGitGadget, Jul 8, 2026
  45. 3/3 contrib: wire up osxkeychain in contrib/Makefile on macOSShardul Natu via GitGitGadget, Jul 8, 2026
  46. Junio C HamanoJul 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.