2 ms·
For a statically linked libc I would expect that only the stdlib code that's actually used is included in the program (even without LTO). For instance a static
by flohofwoe 3y ago
For a statically linked libc I would expect that only the stdlib code that's actually used is included in the program (even without LTO).
For instance a statically linked C hello world for Linux via MUSL (cross-compiled with `zig cc -Os -target x86_64-linux-musl hello.c -o hello` because I'm currently on a Mac) is just 5 KBytes.
- lifthrasiir 3y agoMusl doesn't have anything like Rust backtraces so it's not a fair comparison. By the way, glibc does have one [1], and I would be surprised if adding a backtrace printer doesn't significantly increase the binary size. [1] https://www.gnu.org/software/libc/manual/html_node/Backtraces.html https://www.gnu.org/software/libc/manual/html_node/Backtrace...