Skip to content

Commit 7d29a7f

Browse files
openssl option logic
1 parent df5e267 commit 7d29a7f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

build.zig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ pub fn build(b: *std.Build) !void {
4040
"-fno-sanitize=undefined",
4141
};
4242

43-
const openssl = switch (target.result.os.tag) {
44-
.linux => b.option(bool, "enable-openssl", "Enable OpenSSL support") orelse false,
45-
else => false,
46-
};
43+
const openssl = b.option(bool, "enable-openssl", "Use OpenSSL instead of MbedTLS") orelse false;
4744

4845
if (target.result.os.tag == .windows) {
46+
if (openssl) {
47+
std.log.err("OpenSSL option unsupported on Windows", .{});
48+
return;
49+
}
50+
4951
lib.linkSystemLibrary("winhttp");
5052
lib.linkSystemLibrary("rpcrt4");
5153
lib.linkSystemLibrary("crypt32");

0 commit comments

Comments
 (0)