diff options
author | Yuchen Zeng <zyc@google.com> | 2017-03-17 13:02:03 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2017-03-17 16:00:17 -0700 |
commit | 9bc0d8200ec17ababe4c9cd6134a2cb7465365a6 (patch) | |
tree | 14ac57b2410205774b345de360b0886033d7d433 /templates/binding.gyp.template | |
parent | cabb1517e5ac3cdbe59415678d4f0d284f9fabda (diff) | |
parent | 40a947ef93aeddca3b606613f628d4d09f094e77 (diff) |
Merge remote-tracking branch 'upstream/master' into cares_bazel_rule
Diffstat (limited to 'templates/binding.gyp.template')
-rw-r--r-- | templates/binding.gyp.template | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 568cf75a33..69c67bd2c6 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': [ @@ -56,7 +60,7 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE' ], 'conditions': [ - ['runtime=="node" and grpc_uv=="true"', { + ['grpc_uv=="true"', { 'defines': [ 'GRPC_ARES=0', # Disabling this while bugs are ironed out. Uncomment this to @@ -78,10 +82,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', |