-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.optimizationregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.
Milestone
Description
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Say we want to build a very simple HelloWorld program in x86_64 Linux:
const std = @import("std");
pub fn main() !void {
std.debug.print("Hello World\n", .{});
}Let's try to build them in different versions of Zig with different modes (all of them have enabled exe.strip = true; in build.zig), and here are the binary sizes of them:
| Zig Version | ReleaseFast | ReleaseSmall |
|---|---|---|
| 0.9.1 | 4.6K | 4.6K |
| 0.10.1 | 13K | 8.5K |
| 0.11.0 | 13K | 8.7K |
| 0.12.1 | 11K | 9.0K |
| 0.13.0 | 13K | 13K |
Expected Behavior
Binary size should not increase much compared to v0.9.1, at least in ReleaseSmall mode.
zxubian, adworacz, linusg, hronro, RetroDev256 and 5 more
Metadata
Metadata
Assignees
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.optimizationregressionIt worked in a previous version of Zig, but stopped working.It worked in a previous version of Zig, but stopped working.