aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/binding.gyp.template
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2017-03-02 11:32:08 -0800
committerGravatar murgatroid99 <mlumish@google.com>2017-03-02 11:32:08 -0800
commita99c94766e00dbb4d7f740e4e5fa342a7ea53899 (patch)
treebab11630caba747a150f3f7d8ea06e6e27c357c6 /templates/binding.gyp.template
parented7d06af3eef1c27f10328c73b3ae3ab10d72b10 (diff)
Add option to recompile Node library without ALPN support
Diffstat (limited to 'templates/binding.gyp.template')
-rw-r--r--templates/binding.gyp.template22
1 files changed, 15 insertions, 7 deletions
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index 9d7034e18b..31b8277a24 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -45,7 +45,11 @@
# 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'
+ 'grpc_uv%': 'false',
+ # Some Node installations use the system installation of OpenSSL, and on
+ # some systems, the system OpenSSL still does not have ALPN support. This
+ # will let users recompile gRPC to work without ALPN.
+ 'grpc_alpn%': 'true'
},
'target_defaults': {
'include_dirs': [
@@ -58,8 +62,6 @@
'conditions': [
['runtime=="node" and grpc_uv=="true"', {
'defines': [
- # Disabling this while bugs are ironed out. Uncomment this to
- # re-enable libuv integration in C core.
'GRPC_UV'
]
}],
@@ -77,10 +79,16 @@
'OPENSSL_NO_ASM'
]
}, {
- # 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=1'
+ 'conditions': [
+ ['grpc_alpn=="true"', {
+ 'defines': [
+ 'TSI_OPENSSL_ALPN_SUPPORT=1'
+ ],
+ }, {
+ 'defines': [
+ 'TSI_OPENSSL_ALPN_SUPPORT=0'
+ ],
+ }]
],
'include_dirs': [
'<(node_root_dir)/deps/openssl/openssl/include',