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

[PATCH 0/3] Makefile update libgit.a: Include xdiff and reftable in libgit.a

From
Ezekiel Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Oct 1, 2025, 18:02 UTC
Message-ID
<pull.2065.git.git.1759341748.gitgitgadget@gmail.com>

Add xdiff and reftable to the static library libgit.a that Makefile produces. Meson does not require any changes since it already includes those libraries. The motivation is to simplify Rust's job of linking against the C code by requiring it to only link against a single static library (libgit.a).

The Rust compiler only needs to know how to link against libgit.a in 2 cases that I can think of:

 * Rust unit tests
 * Rust defining the main function

Otherwise Rust can be compiled without linking, and then Makefile and Meson can use Cargo's produced static lib files to build Git.

Note: The flag -fPIE or -fPIC is required for Makefile to build libgit.a in
a way that Cargo can use. It has been deliberately omitted from the
Makefile, for now, since Rust isn't part of Git (yet).
Ezekiel Newren (3):
  make: move xdiff and reftable objects before GITLIBS
  make: delete XDIFF_LIB, add xdiff to LIB_OBJS
  make: delete REFTABLE_LIB, add reftable to LIB_OBJS
 Makefile | 66 +++++++++++++++++++++++---------------------------------
 1 file changed, 27 insertions(+), 39 deletions(-)
base-commit: a91ca5db0318b6fda5a6721ee843f56e7e2fadfc
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2065%2Fezekielnewren%2Fmerge_xdiff_and_reftable_with_libgit-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2065/ezekielnewren/merge_xdiff_and_reftable_with_libgit-v1
Pull-Request: https://github.com/git/git/pull/2065
-- 
gitgitgadget
Next: Ezekiel Newren via GitGitGadget
Message 1 of 23 in “Makefile update libgit.a: Include xdiff and reftable in libgit.a”
  1. 0/3 Makefile update libgit.a: Include xdiff and reftable in libgit.aEzekiel Newren via GitGitGadget, Oct 1, 2025
  2. 1/3 make: move xdiff and reftable objects before GITLIBSEzekiel Newren via GitGitGadget, Oct 1, 2025
  3. 2/3 make: delete XDIFF_LIB, add xdiff to LIB_OBJSEzekiel Newren via GitGitGadget, Oct 1, 2025
  4. Patrick SteinhardtOct 2, 2025
  5. Junio C HamanoOct 2, 2025
  6. Patrick SteinhardtOct 2, 2025
  7. Ezekiel NewrenOct 2, 2025
  8. Junio C HamanoOct 2, 2025
  9. Ezekiel NewrenOct 2, 2025
  10. Ezekiel NewrenOct 2, 2025
  11. 3/3 make: delete REFTABLE_LIB, add reftable to LIB_OBJSEzekiel Newren via GitGitGadget, Oct 1, 2025
  12. Patrick SteinhardtOct 2, 2025
  13. Junio C HamanoOct 2, 2025
  14. Ezekiel NewrenOct 2, 2025
  15. Junio C HamanoOct 1, 2025
  16. Ezekiel NewrenOct 2, 2025
  17. Junio C HamanoOct 2, 2025
  18. Ezekiel NewrenOct 2, 2025
  19. 0/2 Makefile update libgit.a: Include xdiff and reftable in libgit.aEzekiel Newren via GitGitGadget, Oct 2, 2025
  20. 1/2 make: delete XDIFF_LIB, add xdiff to LIB_OBJSEzekiel Newren via GitGitGadget, Oct 2, 2025
  21. 2/2 make: delete REFTABLE_LIB, add reftable to LIB_OBJSEzekiel Newren via GitGitGadget, Oct 2, 2025
  22. Junio C HamanoOct 3, 2025
  23. Patrick SteinhardtOct 8, 2025

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.