aboutsummaryrefslogtreecommitdiffhomepage
path: root/binding.gyp
diff options
context:
space:
mode:
authorGravatar Alistair Veitch <aveitch@google.com>2016-02-05 13:27:42 -0800
committerGravatar Alistair Veitch <aveitch@google.com>2016-02-05 13:27:42 -0800
commitba6065f016ec8cbd607688cb6993d60db5ae3273 (patch)
tree4d5dc0d03a9eda59cc16f26d52e4de31cb4d8f61 /binding.gyp
parent49653c5c7f6e4e012eb299db904f7c80ff2c7854 (diff)
parentb59b142799fe28482162bc192d6205fcb749c6c4 (diff)
merge
Diffstat (limited to 'binding.gyp')
-rw-r--r--binding.gyp139
1 files changed, 63 insertions, 76 deletions
diff --git a/binding.gyp b/binding.gyp
index f1c4ef0b4f..8939c944af 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -44,7 +44,10 @@
],
'conditions': [
['OS == "win"', {
- "include_dirs": [ "third_party/boringssl/include" ],
+ "include_dirs": [
+ "third_party/boringssl/include",
+ "third_party/zlib"
+ ],
"defines": [
'_WIN32_WINNT=0x0600',
'WIN32_LEAN_AND_MEAN',
@@ -63,19 +66,20 @@
"ws2_32"
]
}, { # OS != "win"
+ 'variables': {
+ 'config': '<!(echo $CONFIG)',
+ # 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 output of "node -v" is v[major].[minor].[patch],
- # like "v4.1.1" in a recent version. We use cut to split by period and
- # take the first field (resulting in "v[major]"), then use cut again
- # to take all but the first character, removing the "v".
+ # supports ALPN. The target is "[major].[minor].[patch]". We split by
+ # periods and take the first field to get the major version.
'defines': [
- 'TSI_OPENSSL_ALPN_SUPPORT=<!(node --version | cut -d. -f1 | cut -c2-)'
+ 'TSI_OPENSSL_ALPN_SUPPORT=<!(echo <(target) | cut -d. -f1)'
],
- 'variables': {
- 'config': '<!(echo $CONFIG)'
- },
'include_dirs': [
'<(node_root_dir)/deps/openssl/openssl/include',
'<(node_root_dir)/deps/zlib'
@@ -480,74 +484,10 @@
'-Wall',
'-Werror'
],
- 'target_name': 'gpr',
- 'product_prefix': 'lib',
- 'type': 'static_library',
- 'dependencies': [
- ],
- 'sources': [
- 'src/core/profiling/basic_timers.c',
- 'src/core/profiling/stap_timers.c',
- 'src/core/support/alloc.c',
- 'src/core/support/avl.c',
- 'src/core/support/cmdline.c',
- 'src/core/support/cpu_iphone.c',
- 'src/core/support/cpu_linux.c',
- 'src/core/support/cpu_posix.c',
- 'src/core/support/cpu_windows.c',
- 'src/core/support/env_linux.c',
- 'src/core/support/env_posix.c',
- 'src/core/support/env_win32.c',
- 'src/core/support/file.c',
- 'src/core/support/file_posix.c',
- 'src/core/support/file_win32.c',
- 'src/core/support/histogram.c',
- 'src/core/support/host_port.c',
- 'src/core/support/log.c',
- 'src/core/support/log_android.c',
- 'src/core/support/log_linux.c',
- 'src/core/support/log_posix.c',
- 'src/core/support/log_win32.c',
- 'src/core/support/murmur_hash.c',
- 'src/core/support/slice.c',
- 'src/core/support/slice_buffer.c',
- 'src/core/support/stack_lockfree.c',
- 'src/core/support/string.c',
- 'src/core/support/string_posix.c',
- 'src/core/support/string_win32.c',
- 'src/core/support/subprocess_posix.c',
- 'src/core/support/subprocess_windows.c',
- 'src/core/support/sync.c',
- 'src/core/support/sync_posix.c',
- 'src/core/support/sync_win32.c',
- 'src/core/support/thd.c',
- 'src/core/support/thd_posix.c',
- 'src/core/support/thd_win32.c',
- 'src/core/support/time.c',
- 'src/core/support/time_posix.c',
- 'src/core/support/time_precise.c',
- 'src/core/support/time_win32.c',
- 'src/core/support/tls_pthread.c',
- ],
- "conditions": [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.9'
- }
- }]
- ]
- },
- {
- 'cflags': [
- '-std=c99',
- '-Wall',
- '-Werror'
- ],
'target_name': 'grpc',
'product_prefix': 'lib',
'type': 'static_library',
'dependencies': [
- 'gpr',
],
'sources': [
'src/core/httpcli/httpcli_security_connector.c',
@@ -698,12 +638,54 @@
'src/core/transport/static_metadata.c',
'src/core/transport/transport.c',
'src/core/transport/transport_op_string.c',
+ 'src/core/profiling/basic_timers.c',
+ 'src/core/profiling/stap_timers.c',
+ 'src/core/support/alloc.c',
+ 'src/core/support/avl.c',
+ 'src/core/support/cmdline.c',
+ 'src/core/support/cpu_iphone.c',
+ 'src/core/support/cpu_linux.c',
+ 'src/core/support/cpu_posix.c',
+ 'src/core/support/cpu_windows.c',
+ 'src/core/support/env_linux.c',
+ 'src/core/support/env_posix.c',
+ 'src/core/support/env_win32.c',
+ 'src/core/support/file.c',
+ 'src/core/support/file_posix.c',
+ 'src/core/support/file_win32.c',
+ 'src/core/support/histogram.c',
+ 'src/core/support/host_port.c',
+ 'src/core/support/log.c',
+ 'src/core/support/log_android.c',
+ 'src/core/support/log_linux.c',
+ 'src/core/support/log_posix.c',
+ 'src/core/support/log_win32.c',
+ 'src/core/support/murmur_hash.c',
+ 'src/core/support/slice.c',
+ 'src/core/support/slice_buffer.c',
+ 'src/core/support/stack_lockfree.c',
+ 'src/core/support/string.c',
+ 'src/core/support/string_posix.c',
+ 'src/core/support/string_win32.c',
+ 'src/core/support/subprocess_posix.c',
+ 'src/core/support/subprocess_windows.c',
+ 'src/core/support/sync.c',
+ 'src/core/support/sync_posix.c',
+ 'src/core/support/sync_win32.c',
+ 'src/core/support/thd.c',
+ 'src/core/support/thd_posix.c',
+ 'src/core/support/thd_win32.c',
+ 'src/core/support/time.c',
+ 'src/core/support/time_posix.c',
+ 'src/core/support/time_precise.c',
+ 'src/core/support/time_win32.c',
+ 'src/core/support/tls_pthread.c',
+ 'src/core/support/wrap_memcpy.c',
'src/core/census/context.c',
'src/core/census/initialize.c',
'src/core/census/log.c',
'src/core/census/operation.c',
'src/core/census/placeholders.c',
- 'src/core/census/tag_set.c',
'src/core/census/tracing.c',
],
"conditions": [
@@ -735,7 +717,8 @@
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'OTHER_CFLAGS': [
- '-stdlib=libc++'
+ '-stdlib=libc++',
+ '-std=c++11'
]
}
}],
@@ -744,6 +727,11 @@
"boringssl",
"z",
]
+ }],
+ ['OS=="linux"', {
+ 'ldflags': [
+ '-Wl,-wrap,memcpy'
+ ]
}]
],
"target_name": "grpc_node",
@@ -761,7 +749,6 @@
],
"dependencies": [
"grpc",
- "gpr",
]
},
{