Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Indeed, good observation. Another observation is that 82% of that is debug info.

-OReleaseSmall -fno-strip produces a 580K executable, while -ODebug -fstrip produces a 1.4M executable.

zig's x86 backend makes for a significantly better debugging experience with this zig-aware lldb fork: https://github.com/ziglang/zig/wiki/LLDB-for-Zig

I don't recall whether it supports stepping through comptime logic at the moment; that was something we discussed recently.



is it naive to expect the new backend to release -OReleaseSmall binaries as small as llvm in the future?


As far as I'm aware, using the self-hosted backend for anything other than Debug mode is a goal, but a far-future goal.

I believe the most relevant links are https://github.com/ziglang/zig/issues/16270 and https://github.com/orgs/ziglang/projects/2/views/1?pane=issu... (as you can see, nothing is concrete yet, just vague mentions of optimization passes)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: