mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 08:18:59 +00:00
backport: Prefer BoringSSL as TLS backend
This commit is contained in:
21
build.zig
21
build.zig
@@ -433,13 +433,27 @@ fn addDependencies(b: *Build, mod: *Build.Module, opts: *Build.Step.Options) !vo
|
||||
mod.addCMacro("STDC_HEADERS", "1");
|
||||
mod.addCMacro("TIME_WITH_SYS_TIME", "1");
|
||||
mod.addCMacro("USE_NGHTTP2", "1");
|
||||
mod.addCMacro("USE_MBEDTLS", "1");
|
||||
mod.addCMacro("USE_OPENSSL", "1");
|
||||
mod.addCMacro("OPENSSL_IS_BORINGSSL", "1");
|
||||
mod.addCMacro("USE_THREADS_POSIX", "1");
|
||||
mod.addCMacro("USE_UNIX_SOCKETS", "1");
|
||||
}
|
||||
|
||||
try buildZlib(b, mod);
|
||||
try buildBrotli(b, mod);
|
||||
const boringssl_dep = b.dependency("boringssl-zig", .{
|
||||
.target = target,
|
||||
.optimize = mod.optimize.?,
|
||||
.force_pic = true,
|
||||
});
|
||||
|
||||
const ssl = boringssl_dep.artifact("ssl");
|
||||
ssl.bundle_ubsan_rt = false;
|
||||
const crypto = boringssl_dep.artifact("crypto");
|
||||
crypto.bundle_ubsan_rt = false;
|
||||
|
||||
mod.linkLibrary(ssl);
|
||||
mod.linkLibrary(crypto);
|
||||
try buildMbedtls(b, mod);
|
||||
try buildNghttp2(b, mod);
|
||||
try buildCurl(b, mod);
|
||||
@@ -845,8 +859,9 @@ fn buildCurl(b: *Build, m: *Build.Module) !void {
|
||||
root ++ "lib/vauth/spnego_sspi.c",
|
||||
root ++ "lib/vauth/vauth.c",
|
||||
root ++ "lib/vtls/cipher_suite.c",
|
||||
root ++ "lib/vtls/mbedtls.c",
|
||||
root ++ "lib/vtls/mbedtls_threadlock.c",
|
||||
root ++ "lib/vtls/openssl.c",
|
||||
root ++ "lib/vtls/hostcheck.c",
|
||||
root ++ "lib/vtls/keylog.c",
|
||||
root ++ "lib/vtls/vtls.c",
|
||||
root ++ "lib/vtls/vtls_scache.c",
|
||||
root ++ "lib/vtls/x509asn1.c",
|
||||
|
||||
Reference in New Issue
Block a user