aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/binding.gyp.template
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2017-02-27 13:35:41 -0800
committerGravatar Yuchen Zeng <zyc@google.com>2017-03-17 15:57:23 -0700
commit2c977084c8fec4bc395976338683d1d480bab91e (patch)
treecf696a8403371b308a45d02445864159ba527e08 /templates/binding.gyp.template
parentdc6b569d97aa54e987681f869f13acdd9c89834f (diff)
parentdc720ca6bf27181c040cefcdb298d9dee8bf3058 (diff)
Merge remote-tracking branch 'upstream/master' into cares_bazel_rule
Diffstat (limited to 'templates/binding.gyp.template')
-rw-r--r--templates/binding.gyp.template28
1 files changed, 13 insertions, 15 deletions
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index 7c534bf635..568cf75a33 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -40,7 +40,12 @@
# https://n8.io/converting-a-c-library-to-gyp/
{
'variables': {
- 'runtime%': 'node'
+ 'runtime%': 'node',
+ # UV integration in C core is disabled by default while bugs are ironed
+ # out. It can be re-enabled for one build by setting the npm config
+ # variable grpc_uv to true, and it can be re-enabled permanently by
+ # setting it to true here.
+ 'grpc_uv%': 'false'
},
'target_defaults': {
'include_dirs': [
@@ -51,10 +56,12 @@
'GPR_BACKWARDS_COMPATIBILITY_MODE'
],
'conditions': [
- ['runtime=="node"', {
+ ['runtime=="node" and grpc_uv=="true"', {
'defines': [
- 'GRPC_UV',
'GRPC_ARES=0',
+ # Disabling this while bugs are ironed out. Uncomment this to
+ # re-enable libuv integration in C core.
+ 'GRPC_UV'
]
}],
['OS!="win" and runtime=="electron"', {
@@ -71,19 +78,10 @@
'OPENSSL_NO_ASM'
]
}, {
- # Based on logic above, we know that this must be a non-Windows system
- 'variables': {
- # The output of "node --version" is "v[version]". We use cut to
- # remove the first character.
- 'target%': '<!(node --version | cut -c2-)'
- },
- # Empirically, Node only exports ALPN symbols if its major version is >0.
- # io.js always reports versions >0 and always exports ALPN symbols.
- # Therefore, Node's major version will be truthy if and only if it
- # supports ALPN. The target is "[major].[minor].[patch]". We split by
- # periods and take the first field to get the major version.
+ # As of the beginning of 2017, we only support versions of Node with
+ # embedded versions of OpenSSL that support ALPN
'defines': [
- 'TSI_OPENSSL_ALPN_SUPPORT=<!(echo <(target) | cut -d. -f1)'
+ 'TSI_OPENSSL_ALPN_SUPPORT=1'
],
'include_dirs': [
'<(node_root_dir)/deps/openssl/openssl/include',