aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-10-09 14:11:02 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-10-09 14:11:02 -0700
commit15def98e344bfb220cb03f5cccc7c793f2ecd811 (patch)
treea5e00a8ca91fedc023f4717b29e330ee617c439f /templates
parenteb185de4cb3bd1aff070ac9b43311771f4e8b721 (diff)
Expanded comment in binding.gyp
Diffstat (limited to 'templates')
-rw-r--r--templates/binding.gyp.template4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index 1e5b2ea911..5fcd247442 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -46,6 +46,10 @@
'target_defaults': {
# Emperically, 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 output of "node -v" is v[major].[minor].[patch],
+ # like "v4.1.1" in a recent version. We use grep to extract just the
+ # major version. "4", would be the output for the example.
'defines': [
'TSI_OPENSSL_ALPN_SUPPORT=<!(node -v | grep -oP "(?<=v)(\d+)(?=\.\d+\.\d+)")'
],