Commit 9181c98225

Andrew Kelley <andrew@ziglang.org>
2022-04-28 20:13:33
std.build: fix dll-export-fns API
We have a pattern using `?bool` for the -f/-fno- style flags. Fixup for 8e3add8736be683b450c2754bedb064811baed0e.
1 parent 360ecc1
Changed files (1)
lib
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");