std.build: fix dll-export-fns API

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

Fixup for 8e3add8736be683b450c2754bedb064811baed0e.
This commit is contained in:
Andrew Kelley 2022-04-28 11:13:33 -07:00
parent 360ecc1a2f
commit 9181c98225

View File

@ -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");