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

Reducing git size by building libgit.so

From
EPElmar Pruesse <p@ucdenver.edu>
Date
Jun 11, 2019, 19:52 UTC
Message-ID
<21f1f334-755e-3283-d0da-ec0ab9231cfc@ucdenver.edu>
Hi!

The total compiled size of libexec/git-core is currently somewhere around 30 MB. This is largely due to a number of binaries linking statically against libgit.a. For some folks, every byte counts. I meddled with the Makefile briefly to make it build and use a libgit.so instead, which dropped package size down to 5MB.

Are there, beyond the ~20 ms in extra startup time and the slightly bigger hassle with DSO locations, reasons for the choice to link statically?

best,
Elmar
Next: brian m. carlson
Message 1 of 12 in “Reducing git size by building libgit.so”
  1. Elmar PruesseJun 11, 2019
  2. brian m. carlsonJun 11, 2019
  3. Duy NguyenJun 12, 2019
  4. Paul SmithJun 12, 2019
  5. Johannes SchindelinJun 13, 2019
  6. Paul SmithJun 13, 2019
  7. Junio C HamanoJun 13, 2019
  8. brian m. carlsonJun 12, 2019
  9. Johannes SixtJun 13, 2019
  10. Ævar Arnfjörð BjarmasonJun 12, 2019
  11. Duy NguyenJun 12, 2019
  12. SZEDER GáborJun 12, 2019

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.