#Statically linking on macOS
1 messages · Page 1 of 1 (latest)
Probably not, see apple documentation
in theory yes, you can, but you will need to provide the system calls yourself, which are not stable so they change from version to version
Could change*
There is no guarantee they are there or not
I see. Is that the reason for the larger binary sizes on macOS? I get 52k on macOS, 9k on Linux, 5k on Windows
most likely
clang is able to produce 16k executables
for aarch64 macos
when using write or without?
probably doesn't matter because we need the syscall for exit either way I guess
just an Zig empty main function
yeah, I'm getting 52k with an empty main function
or int main() { return 0; }
the binary size should be lower
maybe it's related to the Zig linker since Zig uses its own by default when targetting macos
crossplatform targetting iirc
I can't find an option to use the system linker
there's a use_lld option afaik