0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-28 14:33:11 +01:00
nodejs/deps/ngtcp2/unofficial.gni

77 lines
1.9 KiB
Plaintext
Raw Normal View History

# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please edit the gyp files if you are making changes to build system.
import("../../node.gni")
# The actual configurations are put inside a template in unofficial.gni to
# prevent accidental edits from contributors.
template("ngtcp2_gn_build") {
config("ngtcp2_config") {
include_dirs = [
"nghttp3/lib/",
"nghttp3/lib/includes/",
"ngtcp2/crypto/includes/",
"ngtcp2/lib/includes/",
]
defines = [
"NGTCP2_STATICLIB",
"NGHTTP3_STATICLIB",
]
}
gypi_values = exec_script("../../tools/gypi_to_gn.py",
[ rebase_path("ngtcp2.gyp") ],
"scope",
[ "ngtcp2.gyp" ])
# FIXME(zcbenz): Some APIs of ngtcp2 are not marked as export, so can not turn
# into component. This should be fixed in upstream ngtcp2
static_library(target_name) {
forward_variables_from(invoker, "*")
public_configs = [ ":ngtcp2_config" ]
defines = [ "_U_" ]
if (is_win) {
defines += [
"WIN32",
"_WINDOWS",
"HAVE_CONFIG_H",
]
} else {
defines += [
"HAVE_UNISTD_H",
]
}
if (is_linux) {
defines += [
"HAVE_ARPA_INET_H",
"HAVE_NETINET_IN_H",
]
}
include_dirs = [
".",
"ngtcp2/lib/",
"ngtcp2/crypto/",
"nghttp3/lib/"
]
sources = gypi_values.nghttp3_sources +
gypi_values.ngtcp2_sources +
gypi_values.ngtcp2_sources_quictls
if (node_use_openssl) {
deps = [ "../openssl" ]
}
if (is_clang || !is_win) {
cflags_c = [
"-Wno-extra-semi",
"-Wno-implicit-fallthrough",
# Remove after https://github.com/ngtcp2/ngtcp2/issues/1050 is fixed.
"-Wno-sometimes-uninitialized",
]
}
}
}