aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build/Step/Compile.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2024-03-23 08:29:18 -0700
committerElaine Gibson <ypsvlq@gmail.com>2024-03-27 10:06:06 +0000
commit4e428415e575c183050d8108af697ac8aeb9a493 (patch)
treed2d035b46e7a0f67d6fad82c6b0dbfb833bcd39f /lib/std/Build/Step/Compile.zig
parentadd74427b9adc9e1b0d39a0fba9d001c0953a659 (diff)
downloadzig-4e428415e575c183050d8108af697ac8aeb9a493.tar.gz
zig-4e428415e575c183050d8108af697ac8aeb9a493.zip
Build.Step.Compile: Add `mingw_unicode_entry_point` field
Corresponds to the `-municode` CLI flag
Diffstat (limited to 'lib/std/Build/Step/Compile.zig')
-rw-r--r--lib/std/Build/Step/Compile.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig
index 75f01dbf5e..9c1354fd30 100644
--- a/lib/std/Build/Step/Compile.zig
+++ b/lib/std/Build/Step/Compile.zig
@@ -161,6 +161,9 @@ dll_export_fns: ?bool = null,
subsystem: ?std.Target.SubSystem = null,
+/// (Windows) When targeting the MinGW ABI, use the unicode entry point (wmain/wWinMain)
+mingw_unicode_entry_point: bool = false,
+
/// How the linker must handle the entry point of the executable.
entry: Entry = .default,
@@ -1583,6 +1586,10 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
});
}
+ if (self.mingw_unicode_entry_point) {
+ try zig_args.append("-municode");
+ }
+
if (self.error_limit) |err_limit| try zig_args.appendSlice(&.{
"--error-limit",
b.fmt("{}", .{err_limit}),