@@ -77,4 +77,66 @@ pub fn build(b: *std.Build) void {
7777 _ = exe .getEmittedBin ();
7878 test_step .dependOn (& exe .step );
7979 }
80+
81+ {
82+ const exe = b .addExecutable (.{
83+ .name = "zig_main" ,
84+ .root_module = b .createModule (.{
85+ .root_source_file = b .path ("main.zig" ),
86+ .target = target ,
87+ .optimize = .Debug ,
88+ }),
89+ });
90+
91+ _ = exe .getEmittedBin ();
92+ test_step .dependOn (& exe .step );
93+ }
94+
95+ {
96+ const exe = b .addExecutable (.{
97+ .name = "zig_main_link_libc" ,
98+ .root_module = b .createModule (.{
99+ .root_source_file = b .path ("main.zig" ),
100+ .target = target ,
101+ .optimize = .Debug ,
102+ .link_libc = true ,
103+ }),
104+ });
105+
106+ _ = exe .getEmittedBin ();
107+ test_step .dependOn (& exe .step );
108+ }
109+
110+ {
111+ const exe = b .addExecutable (.{
112+ .name = "zig_wwinmain" ,
113+ .root_module = b .createModule (.{
114+ .root_source_file = b .path ("wwinmain.zig" ),
115+ .target = target ,
116+ .optimize = .Debug ,
117+ }),
118+ });
119+ exe .mingw_unicode_entry_point = true ;
120+ // Note: `exe.subsystem = .windows;` is not necessary
121+
122+ _ = exe .getEmittedBin ();
123+ test_step .dependOn (& exe .step );
124+ }
125+
126+ {
127+ const exe = b .addExecutable (.{
128+ .name = "zig_wwinmain_link_libc" ,
129+ .root_module = b .createModule (.{
130+ .root_source_file = b .path ("wwinmain.zig" ),
131+ .target = target ,
132+ .optimize = .Debug ,
133+ .link_libc = true ,
134+ }),
135+ });
136+ exe .mingw_unicode_entry_point = true ;
137+ // Note: `exe.subsystem = .windows;` is not necessary
138+
139+ _ = exe .getEmittedBin ();
140+ test_step .dependOn (& exe .step );
141+ }
80142}
0 commit comments