aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-03-28 14:16:30 -0700
committerGitHub <noreply@github.com>2024-03-28 14:16:30 -0700
commit3661133f989fefa64c58447dd0073b8c0e8050fc (patch)
treec1cd62ba6278ab912f9fcdbc0b6ea27778b2dc10 /lib/std/Build
parentc808e546a766192c4a9bd45190d4bcfae61d6f3b (diff)
parentbad9efbcc140ce5e9837ef06652610636593c1d0 (diff)
downloadzig-3661133f989fefa64c58447dd0073b8c0e8050fc.tar.gz
zig-3661133f989fefa64c58447dd0073b8c0e8050fc.zip
Merge pull request #19399 from ypsvlq/mingw
mingw: support -municode
Diffstat (limited to 'lib/std/Build')
-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}),