3 ms·
The Nim binary dynamically links against glibc and SDL2. If you really want to statically link against a C standard library, musl works just fine: @if musl
by def- 11y ago
The Nim binary dynamically links against glibc and SDL2. If you really want to statically link against a C standard library, musl works just fine:
@if musl:
passL = "-static"
gcc.exe = "/usr/local/musl/bin/musl-gcc"
gcc.linkerexe = "/usr/local/musl/bin/musl-gcc"
@end
Now it compiles like this (SDL2 is still dynamically loaded, +1 MB for that):
$ nim -d:release -d:musl c src/nimes
$ ls -lha src/nimes
-rwxr-xr-x 1 def users 219K Mai 1 22:00 src/nimes*