diff options
author | David Garcia Quintas <dgq@google.com> | 2016-02-08 20:07:19 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-02-08 20:07:19 -0800 |
commit | 7e46618897790b0808d676e18cee7c47e40ca0e5 (patch) | |
tree | c363ed99cce18a6443bcf18ec2b4b98f4878772c /binding.gyp | |
parent | 9508a42096762eef3665f046cc4f370874fd9f7c (diff) | |
parent | 2dbaca8adce55fb8e54a1e4d5c19f75ffcc3fd79 (diff) |
Merge branch 'master' of github.com:grpc/grpc into grpclb_api
Diffstat (limited to 'binding.gyp')
-rw-r--r-- | binding.gyp | 140 |
1 files changed, 65 insertions, 75 deletions
diff --git a/binding.gyp b/binding.gyp index 416a6680bd..9561480015 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,73 +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/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', @@ -650,6 +591,7 @@ 'src/core/json/json_string.c', 'src/core/json/json_writer.c', 'src/core/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/surface/alarm.c', 'src/core/surface/api_trace.c', 'src/core/surface/byte_buffer.c', 'src/core/surface/byte_buffer_reader.c', @@ -698,10 +640,53 @@ '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/operation.c', - 'src/core/census/tag_set.c', + 'src/core/census/placeholders.c', 'src/core/census/tracing.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', @@ -736,7 +721,8 @@ 'xcode_settings': { 'MACOSX_DEPLOYMENT_TARGET': '10.9', 'OTHER_CFLAGS': [ - '-stdlib=libc++' + '-stdlib=libc++', + '-std=c++11' ] } }], @@ -745,6 +731,11 @@ "boringssl", "z", ] + }], + ['OS=="linux"', { + 'ldflags': [ + '-Wl,-wrap,memcpy' + ] }] ], "target_name": "grpc_node", @@ -762,7 +753,6 @@ ], "dependencies": [ "grpc", - "gpr", ] }, { |