Skip to content

Commit

Permalink
openssl support depend on ZAP_USE_OPENSSL=true env
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai committed Jan 5, 2024
1 parent 081bd05 commit 6e5d028
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ pub fn build(b: *std.build.Builder) !void {
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const optimize = b.standardOptimizeOption(.{});

const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse false;
// Use an os env var to determine whether to build openssl support
const use_openssl = blk: {
if (std.os.getenv("ZAP_USE_OPENSSL")) |val| {
if (std.mem.eql(u8, val, "true")) break :blk true;
}
break :blk false;
};

// create a module to be used internally.
var zap_module = b.createModule(.{
Expand Down

0 comments on commit 6e5d028

Please sign in to comment.