zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 9181c98225dccbe698efafffd9a7bc6f50b8b46d (tree)
parent 360ecc1a2f72967f3a3882b3327e130bdc4e18c0
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 28 Apr 2022 11:13:33 -0700

std.build: fix dll-export-fns API

We have a pattern using `?bool` for the -f/-fno- style flags.

Fixup for 8e3add8736be683b450c2754bedb064811baed0e.

Diffstat:
Mlib/std/build.zig | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/std/build.zig b/lib/std/build.zig @@ -1583,7 +1583,7 @@ pub const LibExeObjStep = struct { red_zone: ?bool = null, omit_frame_pointer: ?bool = null, - no_dll_export_fns: bool = false, + dll_export_fns: ?bool = null, subsystem: ?std.Target.SubSystem = null, @@ -2640,8 +2640,12 @@ pub const LibExeObjStep = struct { try zig_args.append("-fno-omit-frame-pointer"); } } - if (self.no_dll_export_fns) { - try zig_args.append("-fno-dll-export-fns"); + if (self.dll_export_fns) |dll_export_fns| { + if (dll_export_fns) { + try zig_args.append("-fdll-export-fns"); + } else { + try zig_args.append("-fno-dll-export-fns"); + } } if (self.disable_sanitize_c) { try zig_args.append("-fno-sanitize-c");