Follow

apparently including Git into a program which does nothing increases its size to 2.5 megabytes

· · Web · 2 · 0 · 0

@Lady i feel like that shouldn’t be happening but i don’t really understand it enough to diagnose. also C sometimes libraries are just built like this so

@aescling i don't know enough about how linkers operate to say. but git does do a huge amount of setup and teardown (see <github.com/git/git/commit/3f2e>)

@aescling for the record this was without link‐time optimization; if you add -flto the size drops to just under one megabyte

@aescling *maybe ten kilobytes if you do -flto while building git as well

@aescling (i’m using git’s Makefiles as a base and apparently they do not believe in LTO by default)

@aescling “maybe ten kilobytes” might be wrong; i think i got this somehow but now i’m not reproducing it??

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.