Zig Version
0.12.0-dev.2619+5cf138e51
Steps to Reproduce and Observed Behavior
Build command: zig build-exe -OReleaseSmall -flto -fstrip -fsingle-threaded -target x86_64-windows main.zig
Code:
const std = @import("std");
pub fn main() void {
_ = std.fs.cwd().openFile("test", .{}) catch {};
_ = std.fs.cwd().createFile("test", .{}) catch {};
}
If I comment out any one line of the two, I get a 12KB exe file.
However, If I keep both two lines, I get a 140KB exe file. Also, I see very long zero bytes in the EXE file.
big-small.zip
big.exe: both line.
small.exe: only the "openFile" line.
Expected Behavior
The exe should be smaller, maybe 10-20KB.
Zig Version
0.12.0-dev.2619+5cf138e51
Steps to Reproduce and Observed Behavior
Build command:
zig build-exe -OReleaseSmall -flto -fstrip -fsingle-threaded -target x86_64-windows main.zigCode:
If I comment out any one line of the two, I get a 12KB exe file.
However, If I keep both two lines, I get a 140KB exe file. Also, I see very long zero bytes in the EXE file.
big-small.zip
big.exe: both line.
small.exe: only the "openFile" line.
Expected Behavior
The exe should be smaller, maybe 10-20KB.