aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2016-01-27 08:13:33 +0000
committerGravatar Craig Tiller <craig.tiller@gmail.com>2016-01-27 08:13:33 +0000
commitcde1ee1440c72fc50607bb22421e283dd145e6b6 (patch)
treefafd2c4d95e9a1db2ff47538d7a600d3d87eebc4
parent338576096f951821e9610525a25235152fcf9011 (diff)
parent4f3840dc06676df5eed09b58828393fe85a599c2 (diff)
Merge github.com:grpc/grpc into twah
-rw-r--r--Makefile63
-rw-r--r--binding.gyp403
-rw-r--r--build.yaml2
-rw-r--r--include/grpc++/client_context.h1
-rw-r--r--include/grpc++/server.h2
-rw-r--r--package.json441
-rw-r--r--src/core/surface/init.c6
-rw-r--r--src/cpp/client/client_context.cc3
-rw-r--r--src/cpp/server/server.cc19
-rw-r--r--src/node/index.js4
-rw-r--r--src/node/src/client.js4
-rw-r--r--src/node/src/credentials.js4
-rw-r--r--src/node/src/grpc_extension.js40
-rw-r--r--src/node/src/metadata.js2
-rw-r--r--src/node/src/server.js4
-rw-r--r--src/node/test/call_test.js4
-rw-r--r--src/node/test/channel_test.js4
-rw-r--r--src/node/test/constant_test.js4
-rw-r--r--src/node/test/end_to_end_test.js4
-rw-r--r--src/node/test/server_test.js4
-rw-r--r--src/node/test/surface_test.js14
-rw-r--r--src/python/grpcio/commands.py2
-rw-r--r--src/ruby/ext/grpc/rb_call.c6
-rw-r--r--src/ruby/ext/grpc/rb_call_credentials.c2
-rw-r--r--src/ruby/ext/grpc/rb_event_thread.c3
-rw-r--r--templates/Makefile.template63
-rw-r--r--templates/binding.gyp.template96
-rw-r--r--templates/package.json.template14
-rw-r--r--test/cpp/qps/qps_driver.cc2
-rwxr-xr-xtools/buildgen/generate_projects.py3
-rwxr-xr-xtools/jenkins/grpc_interop_node/build_interop.sh2
-rwxr-xr-xtools/run_tests/build_node.sh2
-rwxr-xr-xtools/run_tests/run_tests.py2
-rw-r--r--tools/run_tests/sanity_tests.yaml4
34 files changed, 1083 insertions, 150 deletions
diff --git a/Makefile b/Makefile
index 94aaaecf21..f7539216da 100644
--- a/Makefile
+++ b/Makefile
@@ -226,26 +226,44 @@ DEFINES_mutrace = _DEBUG DEBUG
prefix ?= /usr/local
-PROTOC = protoc
-DTRACE = dtrace
+PROTOC ?= protoc
+DTRACE ?= dtrace
CONFIG ?= opt
+# Doing X ?= Y is the same as:
+# ifeq ($(origin X), undefined)
+# X = Y
+# endif
+# but some variables, such as CC, CXX, LD or AR, have defaults.
+# So instead of using ?= on them, we need to check their origin.
+# See:
+# https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
+# https://www.gnu.org/software/make/manual/html_node/Flavors.html#index-_003f_003d
+# https://www.gnu.org/software/make/manual/html_node/Origin-Function.html
+ifeq ($(origin CC), default)
CC = $(CC_$(CONFIG))
+endif
+ifeq ($(origin CXX), default)
CXX = $(CXX_$(CONFIG))
+endif
+ifeq ($(origin LD), default)
LD = $(LD_$(CONFIG))
-LDXX = $(LDXX_$(CONFIG))
+endif
+LDXX ?= $(LDXX_$(CONFIG))
+ifeq ($(origin AR), default)
AR = ar
+endif
ifeq ($(SYSTEM),Linux)
-STRIP = strip --strip-unneeded
+STRIP ?= strip --strip-unneeded
else
ifeq ($(SYSTEM),Darwin)
-STRIP = strip -x
+STRIP ?= strip -x
else
-STRIP = strip
+STRIP ?= strip
endif
endif
-INSTALL = install
-RM = rm -f
-PKG_CONFIG = pkg-config
+INSTALL ?= install
+RM ?= rm -f
+PKG_CONFIG ?= pkg-config
ifndef VALID_CONFIG_$(CONFIG)
$(error Invalid CONFIG value '$(CONFIG)')
@@ -272,10 +290,10 @@ endif
# cross-compiling, you can override these variables from GNU make's
# command line: make CC=cross-gcc HOST_CC=gcc
-HOST_CC = $(CC)
-HOST_CXX = $(CXX)
-HOST_LD = $(LD)
-HOST_LDXX = $(LDXX)
+HOST_CC ?= $(CC)
+HOST_CXX ?= $(CXX)
+HOST_LD ?= $(LD)
+HOST_LDXX ?= $(LDXX)
ifdef EXTRA_DEFINES
DEFINES += $(EXTRA_DEFINES)
@@ -406,14 +424,6 @@ else
IS_GIT_FOLDER = true
endif
-ifeq ($(SYSTEM),Linux)
-OPENSSL_REQUIRES_DL = true
-endif
-
-ifeq ($(SYSTEM),Darwin)
-OPENSSL_REQUIRES_DL = true
-endif
-
ifeq ($(HAS_PKG_CONFIG),true)
OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl
OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl
@@ -432,11 +442,6 @@ OPENSSL_NPN_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/open
ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS)
PROTOBUF_CHECK_CMD = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS)
-ifeq ($(OPENSSL_REQUIRES_DL),true)
-OPENSSL_ALPN_CHECK_CMD += -ldl
-OPENSSL_NPN_CHECK_CMD += -ldl
-endif
-
endif # HAS_PKG_CONFIG
PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/perftools.c -lprofiler $(LDFLAGS)
@@ -600,9 +605,6 @@ OPENSSL_DEP += $(LIBDIR)/$(CONFIG)/libboringssl.a
OPENSSL_MERGE_LIBS += $(LIBDIR)/$(CONFIG)/libboringssl.a
# need to prefix these to ensure overriding system libraries
CPPFLAGS := -Ithird_party/boringssl/include $(CPPFLAGS)
-ifeq ($(OPENSSL_REQUIRES_DL),true)
-LIBS_SECURE = dl
-endif # OPENSSL_REQUIRES_DL
else # EMBED_OPENSSL=false
ifeq ($(HAS_PKG_CONFIG),true)
OPENSSL_PKG_CONFIG = true
@@ -622,10 +624,7 @@ ifeq ($(HAS_SYSTEM_OPENSSL_NPN),true)
CPPFLAGS += -DTSI_OPENSSL_ALPN_SUPPORT=0
LIBS_SECURE = $(OPENSSL_LIBS)
endif # HAS_SYSTEM_OPENSSL_NPN
-ifeq ($(OPENSSL_REQUIRES_DL),true)
-LIBS_SECURE += dl
PC_LIBS_SECURE = $(addprefix -l, $(LIBS_SECURE))
-endif # OPENSSL_REQUIRES_DL=true
endif # EMBED_OPENSSL
endif # NO_SECURE
diff --git a/binding.gyp b/binding.gyp
index f6d60b9758..b1c0214d5f 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -5,7 +5,7 @@
# This file can be regenerated from the template by running
# tools/buildgen/generate_projects.sh
-# Copyright 2015, Google Inc.
+# Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -54,12 +54,16 @@
],
'include_dirs': [
'.',
- 'include',
- '<(node_root_dir)/deps/openssl/openssl/include',
- '<(node_root_dir)/deps/zlib'
+ 'include'
],
'conditions': [
- ['OS != "win"', {
+ ['OS == "win"', {
+ "include_dirs": [ "third_party/boringssl/include" ]
+ }, {
+ 'include_dirs': [
+ '<(node_root_dir)/deps/openssl/openssl/include',
+ '<(node_root_dir)/deps/zlib'
+ ],
'conditions': [
['config=="gcov"', {
'cflags': [
@@ -72,20 +76,366 @@
'-fprofile-arcs'
]
}
- ]
+ ],
+ ["target_arch=='ia32'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
+ }],
+ ["target_arch=='x64'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
+ }],
+ ["target_arch=='arm'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
+ }]
]
- }],
- ["target_arch=='ia32'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
- }],
- ["target_arch=='x64'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
- }],
- ["target_arch=='arm'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
}]
]
},
+ 'conditions': [
+ ['OS == "win"', {
+ 'targets': [
+ # Only want to compile BoringSSL and zlib under Windows
+ {
+ 'cflags': [
+ '-std=c99',
+ '-Wall',
+ '-Werror'
+ ],
+ 'target_name': 'boringssl',
+ 'product_prefix': 'lib',
+ 'type': 'static_library',
+ 'dependencies': [
+ ],
+ 'sources': [
+ 'src/boringssl/err_data.c',
+ 'third_party/boringssl/crypto/aes/aes.c',
+ 'third_party/boringssl/crypto/aes/mode_wrappers.c',
+ 'third_party/boringssl/crypto/asn1/a_bitstr.c',
+ 'third_party/boringssl/crypto/asn1/a_bool.c',
+ 'third_party/boringssl/crypto/asn1/a_bytes.c',
+ 'third_party/boringssl/crypto/asn1/a_d2i_fp.c',
+ 'third_party/boringssl/crypto/asn1/a_dup.c',
+ 'third_party/boringssl/crypto/asn1/a_enum.c',
+ 'third_party/boringssl/crypto/asn1/a_gentm.c',
+ 'third_party/boringssl/crypto/asn1/a_i2d_fp.c',
+ 'third_party/boringssl/crypto/asn1/a_int.c',
+ 'third_party/boringssl/crypto/asn1/a_mbstr.c',
+ 'third_party/boringssl/crypto/asn1/a_object.c',
+ 'third_party/boringssl/crypto/asn1/a_octet.c',
+ 'third_party/boringssl/crypto/asn1/a_print.c',
+ 'third_party/boringssl/crypto/asn1/a_strnid.c',
+ 'third_party/boringssl/crypto/asn1/a_time.c',
+ 'third_party/boringssl/crypto/asn1/a_type.c',
+ 'third_party/boringssl/crypto/asn1/a_utctm.c',
+ 'third_party/boringssl/crypto/asn1/a_utf8.c',
+ 'third_party/boringssl/crypto/asn1/asn1_lib.c',
+ 'third_party/boringssl/crypto/asn1/asn1_par.c',
+ 'third_party/boringssl/crypto/asn1/asn_pack.c',
+ 'third_party/boringssl/crypto/asn1/bio_asn1.c',
+ 'third_party/boringssl/crypto/asn1/bio_ndef.c',
+ 'third_party/boringssl/crypto/asn1/f_enum.c',
+ 'third_party/boringssl/crypto/asn1/f_int.c',
+ 'third_party/boringssl/crypto/asn1/f_string.c',
+ 'third_party/boringssl/crypto/asn1/t_bitst.c',
+ 'third_party/boringssl/crypto/asn1/t_pkey.c',
+ 'third_party/boringssl/crypto/asn1/tasn_dec.c',
+ 'third_party/boringssl/crypto/asn1/tasn_enc.c',
+ 'third_party/boringssl/crypto/asn1/tasn_fre.c',
+ 'third_party/boringssl/crypto/asn1/tasn_new.c',
+ 'third_party/boringssl/crypto/asn1/tasn_prn.c',
+ 'third_party/boringssl/crypto/asn1/tasn_typ.c',
+ 'third_party/boringssl/crypto/asn1/tasn_utl.c',
+ 'third_party/boringssl/crypto/asn1/x_bignum.c',
+ 'third_party/boringssl/crypto/asn1/x_long.c',
+ 'third_party/boringssl/crypto/base64/base64.c',
+ 'third_party/boringssl/crypto/bio/bio.c',
+ 'third_party/boringssl/crypto/bio/bio_mem.c',
+ 'third_party/boringssl/crypto/bio/buffer.c',
+ 'third_party/boringssl/crypto/bio/connect.c',
+ 'third_party/boringssl/crypto/bio/fd.c',
+ 'third_party/boringssl/crypto/bio/file.c',
+ 'third_party/boringssl/crypto/bio/hexdump.c',
+ 'third_party/boringssl/crypto/bio/pair.c',
+ 'third_party/boringssl/crypto/bio/printf.c',
+ 'third_party/boringssl/crypto/bio/socket.c',
+ 'third_party/boringssl/crypto/bio/socket_helper.c',
+ 'third_party/boringssl/crypto/bn/add.c',
+ 'third_party/boringssl/crypto/bn/asm/x86_64-gcc.c',
+ 'third_party/boringssl/crypto/bn/bn.c',
+ 'third_party/boringssl/crypto/bn/bn_asn1.c',
+ 'third_party/boringssl/crypto/bn/cmp.c',
+ 'third_party/boringssl/crypto/bn/convert.c',
+ 'third_party/boringssl/crypto/bn/ctx.c',
+ 'third_party/boringssl/crypto/bn/div.c',
+ 'third_party/boringssl/crypto/bn/exponentiation.c',
+ 'third_party/boringssl/crypto/bn/gcd.c',
+ 'third_party/boringssl/crypto/bn/generic.c',
+ 'third_party/boringssl/crypto/bn/kronecker.c',
+ 'third_party/boringssl/crypto/bn/montgomery.c',
+ 'third_party/boringssl/crypto/bn/mul.c',
+ 'third_party/boringssl/crypto/bn/prime.c',
+ 'third_party/boringssl/crypto/bn/random.c',
+ 'third_party/boringssl/crypto/bn/rsaz_exp.c',
+ 'third_party/boringssl/crypto/bn/shift.c',
+ 'third_party/boringssl/crypto/bn/sqrt.c',
+ 'third_party/boringssl/crypto/buf/buf.c',
+ 'third_party/boringssl/crypto/bytestring/ber.c',
+ 'third_party/boringssl/crypto/bytestring/cbb.c',
+ 'third_party/boringssl/crypto/bytestring/cbs.c',
+ 'third_party/boringssl/crypto/chacha/chacha_generic.c',
+ 'third_party/boringssl/crypto/chacha/chacha_vec.c',
+ 'third_party/boringssl/crypto/cipher/aead.c',
+ 'third_party/boringssl/crypto/cipher/cipher.c',
+ 'third_party/boringssl/crypto/cipher/derive_key.c',
+ 'third_party/boringssl/crypto/cipher/e_aes.c',
+ 'third_party/boringssl/crypto/cipher/e_chacha20poly1305.c',
+ 'third_party/boringssl/crypto/cipher/e_des.c',
+ 'third_party/boringssl/crypto/cipher/e_null.c',
+ 'third_party/boringssl/crypto/cipher/e_rc2.c',
+ 'third_party/boringssl/crypto/cipher/e_rc4.c',
+ 'third_party/boringssl/crypto/cipher/e_ssl3.c',
+ 'third_party/boringssl/crypto/cipher/e_tls.c',
+ 'third_party/boringssl/crypto/cipher/tls_cbc.c',
+ 'third_party/boringssl/crypto/cmac/cmac.c',
+ 'third_party/boringssl/crypto/conf/conf.c',
+ 'third_party/boringssl/crypto/cpu-arm.c',
+ 'third_party/boringssl/crypto/cpu-intel.c',
+ 'third_party/boringssl/crypto/crypto.c',
+ 'third_party/boringssl/crypto/curve25519/curve25519.c',
+ 'third_party/boringssl/crypto/des/des.c',
+ 'third_party/boringssl/crypto/dh/check.c',
+ 'third_party/boringssl/crypto/dh/dh.c',
+ 'third_party/boringssl/crypto/dh/dh_asn1.c',
+ 'third_party/boringssl/crypto/dh/params.c',
+ 'third_party/boringssl/crypto/digest/digest.c',
+ 'third_party/boringssl/crypto/digest/digests.c',
+ 'third_party/boringssl/crypto/directory_posix.c',
+ 'third_party/boringssl/crypto/directory_win.c',
+ 'third_party/boringssl/crypto/dsa/dsa.c',
+ 'third_party/boringssl/crypto/dsa/dsa_asn1.c',
+ 'third_party/boringssl/crypto/ec/ec.c',
+ 'third_party/boringssl/crypto/ec/ec_asn1.c',
+ 'third_party/boringssl/crypto/ec/ec_key.c',
+ 'third_party/boringssl/crypto/ec/ec_montgomery.c',
+ 'third_party/boringssl/crypto/ec/oct.c',
+ 'third_party/boringssl/crypto/ec/p224-64.c',
+ 'third_party/boringssl/crypto/ec/p256-64.c',
+ 'third_party/boringssl/crypto/ec/p256-x86_64.c',
+ 'third_party/boringssl/crypto/ec/simple.c',
+ 'third_party/boringssl/crypto/ec/util-64.c',
+ 'third_party/boringssl/crypto/ec/wnaf.c',
+ 'third_party/boringssl/crypto/ecdh/ecdh.c',
+ 'third_party/boringssl/crypto/ecdsa/ecdsa.c',
+ 'third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c',
+ 'third_party/boringssl/crypto/engine/engine.c',
+ 'third_party/boringssl/crypto/err/err.c',
+ 'third_party/boringssl/crypto/evp/algorithm.c',
+ 'third_party/boringssl/crypto/evp/digestsign.c',
+ 'third_party/boringssl/crypto/evp/evp.c',
+ 'third_party/boringssl/crypto/evp/evp_asn1.c',
+ 'third_party/boringssl/crypto/evp/evp_ctx.c',
+ 'third_party/boringssl/crypto/evp/p_dsa_asn1.c',
+ 'third_party/boringssl/crypto/evp/p_ec.c',
+ 'third_party/boringssl/crypto/evp/p_ec_asn1.c',
+ 'third_party/boringssl/crypto/evp/p_rsa.c',
+ 'third_party/boringssl/crypto/evp/p_rsa_asn1.c',
+ 'third_party/boringssl/crypto/evp/pbkdf.c',
+ 'third_party/boringssl/crypto/evp/sign.c',
+ 'third_party/boringssl/crypto/ex_data.c',
+ 'third_party/boringssl/crypto/hkdf/hkdf.c',
+ 'third_party/boringssl/crypto/hmac/hmac.c',
+ 'third_party/boringssl/crypto/lhash/lhash.c',
+ 'third_party/boringssl/crypto/md4/md4.c',
+ 'third_party/boringssl/crypto/md5/md5.c',
+ 'third_party/boringssl/crypto/mem.c',
+ 'third_party/boringssl/crypto/modes/cbc.c',
+ 'third_party/boringssl/crypto/modes/cfb.c',
+ 'third_party/boringssl/crypto/modes/ctr.c',
+ 'third_party/boringssl/crypto/modes/gcm.c',
+ 'third_party/boringssl/crypto/modes/ofb.c',
+ 'third_party/boringssl/crypto/obj/obj.c',
+ 'third_party/boringssl/crypto/obj/obj_xref.c',
+ 'third_party/boringssl/crypto/pem/pem_all.c',
+ 'third_party/boringssl/crypto/pem/pem_info.c',
+ 'third_party/boringssl/crypto/pem/pem_lib.c',
+ 'third_party/boringssl/crypto/pem/pem_oth.c',
+ 'third_party/boringssl/crypto/pem/pem_pk8.c',
+ 'third_party/boringssl/crypto/pem/pem_pkey.c',
+ 'third_party/boringssl/crypto/pem/pem_x509.c',
+ 'third_party/boringssl/crypto/pem/pem_xaux.c',
+ 'third_party/boringssl/crypto/pkcs8/p5_pbe.c',
+ 'third_party/boringssl/crypto/pkcs8/p5_pbev2.c',
+ 'third_party/boringssl/crypto/pkcs8/p8_pkey.c',
+ 'third_party/boringssl/crypto/pkcs8/pkcs8.c',
+ 'third_party/boringssl/crypto/poly1305/poly1305.c',
+ 'third_party/boringssl/crypto/poly1305/poly1305_arm.c',
+ 'third_party/boringssl/crypto/poly1305/poly1305_vec.c',
+ 'third_party/boringssl/crypto/rand/rand.c',
+ 'third_party/boringssl/crypto/rand/urandom.c',
+ 'third_party/boringssl/crypto/rand/windows.c',
+ 'third_party/boringssl/crypto/rc4/rc4.c',
+ 'third_party/boringssl/crypto/refcount_c11.c',
+ 'third_party/boringssl/crypto/refcount_lock.c',
+ 'third_party/boringssl/crypto/rsa/blinding.c',
+ 'third_party/boringssl/crypto/rsa/padding.c',
+ 'third_party/boringssl/crypto/rsa/rsa.c',
+ 'third_party/boringssl/crypto/rsa/rsa_asn1.c',
+ 'third_party/boringssl/crypto/rsa/rsa_impl.c',
+ 'third_party/boringssl/crypto/sha/sha1.c',
+ 'third_party/boringssl/crypto/sha/sha256.c',
+ 'third_party/boringssl/crypto/sha/sha512.c',
+ 'third_party/boringssl/crypto/stack/stack.c',
+ 'third_party/boringssl/crypto/thread.c',
+ 'third_party/boringssl/crypto/thread_none.c',
+ 'third_party/boringssl/crypto/thread_pthread.c',
+ 'third_party/boringssl/crypto/thread_win.c',
+ 'third_party/boringssl/crypto/time_support.c',
+ 'third_party/boringssl/crypto/x509/a_digest.c',
+ 'third_party/boringssl/crypto/x509/a_sign.c',
+ 'third_party/boringssl/crypto/x509/a_strex.c',
+ 'third_party/boringssl/crypto/x509/a_verify.c',
+ 'third_party/boringssl/crypto/x509/asn1_gen.c',
+ 'third_party/boringssl/crypto/x509/by_dir.c',
+ 'third_party/boringssl/crypto/x509/by_file.c',
+ 'third_party/boringssl/crypto/x509/i2d_pr.c',
+ 'third_party/boringssl/crypto/x509/pkcs7.c',
+ 'third_party/boringssl/crypto/x509/t_crl.c',
+ 'third_party/boringssl/crypto/x509/t_req.c',
+ 'third_party/boringssl/crypto/x509/t_x509.c',
+ 'third_party/boringssl/crypto/x509/t_x509a.c',
+ 'third_party/boringssl/crypto/x509/x509.c',
+ 'third_party/boringssl/crypto/x509/x509_att.c',
+ 'third_party/boringssl/crypto/x509/x509_cmp.c',
+ 'third_party/boringssl/crypto/x509/x509_d2.c',
+ 'third_party/boringssl/crypto/x509/x509_def.c',
+ 'third_party/boringssl/crypto/x509/x509_ext.c',
+ 'third_party/boringssl/crypto/x509/x509_lu.c',
+ 'third_party/boringssl/crypto/x509/x509_obj.c',
+ 'third_party/boringssl/crypto/x509/x509_r2x.c',
+ 'third_party/boringssl/crypto/x509/x509_req.c',
+ 'third_party/boringssl/crypto/x509/x509_set.c',
+ 'third_party/boringssl/crypto/x509/x509_trs.c',
+ 'third_party/boringssl/crypto/x509/x509_txt.c',
+ 'third_party/boringssl/crypto/x509/x509_v3.c',
+ 'third_party/boringssl/crypto/x509/x509_vfy.c',
+ 'third_party/boringssl/crypto/x509/x509_vpm.c',
+ 'third_party/boringssl/crypto/x509/x509cset.c',
+ 'third_party/boringssl/crypto/x509/x509name.c',
+ 'third_party/boringssl/crypto/x509/x509rset.c',
+ 'third_party/boringssl/crypto/x509/x509spki.c',
+ 'third_party/boringssl/crypto/x509/x509type.c',
+ 'third_party/boringssl/crypto/x509/x_algor.c',
+ 'third_party/boringssl/crypto/x509/x_all.c',
+ 'third_party/boringssl/crypto/x509/x_attrib.c',
+ 'third_party/boringssl/crypto/x509/x_crl.c',
+ 'third_party/boringssl/crypto/x509/x_exten.c',
+ 'third_party/boringssl/crypto/x509/x_info.c',
+ 'third_party/boringssl/crypto/x509/x_name.c',
+ 'third_party/boringssl/crypto/x509/x_pkey.c',
+ 'third_party/boringssl/crypto/x509/x_pubkey.c',
+ 'third_party/boringssl/crypto/x509/x_req.c',
+ 'third_party/boringssl/crypto/x509/x_sig.c',
+ 'third_party/boringssl/crypto/x509/x_spki.c',
+ 'third_party/boringssl/crypto/x509/x_val.c',
+ 'third_party/boringssl/crypto/x509/x_x509.c',
+ 'third_party/boringssl/crypto/x509/x_x509a.c',
+ 'third_party/boringssl/crypto/x509v3/pcy_cache.c',
+ 'third_party/boringssl/crypto/x509v3/pcy_data.c',
+ 'third_party/boringssl/crypto/x509v3/pcy_lib.c',
+ 'third_party/boringssl/crypto/x509v3/pcy_map.c',
+ 'third_party/boringssl/crypto/x509v3/pcy_node.c',
+ 'third_party/boringssl/crypto/x509v3/pcy_tree.c',
+ 'third_party/boringssl/crypto/x509v3/v3_akey.c',
+ 'third_party/boringssl/crypto/x509v3/v3_akeya.c',
+ 'third_party/boringssl/crypto/x509v3/v3_alt.c',
+ 'third_party/boringssl/crypto/x509v3/v3_bcons.c',
+ 'third_party/boringssl/crypto/x509v3/v3_bitst.c',
+ 'third_party/boringssl/crypto/x509v3/v3_conf.c',
+ 'third_party/boringssl/crypto/x509v3/v3_cpols.c',
+ 'third_party/boringssl/crypto/x509v3/v3_crld.c',
+ 'third_party/boringssl/crypto/x509v3/v3_enum.c',
+ 'third_party/boringssl/crypto/x509v3/v3_extku.c',
+ 'third_party/boringssl/crypto/x509v3/v3_genn.c',
+ 'third_party/boringssl/crypto/x509v3/v3_ia5.c',
+ 'third_party/boringssl/crypto/x509v3/v3_info.c',
+ 'third_party/boringssl/crypto/x509v3/v3_int.c',
+ 'third_party/boringssl/crypto/x509v3/v3_lib.c',
+ 'third_party/boringssl/crypto/x509v3/v3_ncons.c',
+ 'third_party/boringssl/crypto/x509v3/v3_pci.c',
+ 'third_party/boringssl/crypto/x509v3/v3_pcia.c',
+ 'third_party/boringssl/crypto/x509v3/v3_pcons.c',
+ 'third_party/boringssl/crypto/x509v3/v3_pku.c',
+ 'third_party/boringssl/crypto/x509v3/v3_pmaps.c',
+ 'third_party/boringssl/crypto/x509v3/v3_prn.c',
+ 'third_party/boringssl/crypto/x509v3/v3_purp.c',
+ 'third_party/boringssl/crypto/x509v3/v3_skey.c',
+ 'third_party/boringssl/crypto/x509v3/v3_sxnet.c',
+ 'third_party/boringssl/crypto/x509v3/v3_utl.c',
+ 'third_party/boringssl/ssl/custom_extensions.c',
+ 'third_party/boringssl/ssl/d1_both.c',
+ 'third_party/boringssl/ssl/d1_clnt.c',
+ 'third_party/boringssl/ssl/d1_lib.c',
+ 'third_party/boringssl/ssl/d1_meth.c',
+ 'third_party/boringssl/ssl/d1_pkt.c',
+ 'third_party/boringssl/ssl/d1_srtp.c',
+ 'third_party/boringssl/ssl/d1_srvr.c',
+ 'third_party/boringssl/ssl/dtls_record.c',
+ 'third_party/boringssl/ssl/pqueue/pqueue.c',
+ 'third_party/boringssl/ssl/s3_both.c',
+ 'third_party/boringssl/ssl/s3_clnt.c',
+ 'third_party/boringssl/ssl/s3_enc.c',
+ 'third_party/boringssl/ssl/s3_lib.c',
+ 'third_party/boringssl/ssl/s3_meth.c',
+ 'third_party/boringssl/ssl/s3_pkt.c',
+ 'third_party/boringssl/ssl/s3_srvr.c',
+ 'third_party/boringssl/ssl/ssl_aead_ctx.c',
+ 'third_party/boringssl/ssl/ssl_asn1.c',
+ 'third_party/boringssl/ssl/ssl_buffer.c',
+ 'third_party/boringssl/ssl/ssl_cert.c',
+ 'third_party/boringssl/ssl/ssl_cipher.c',
+ 'third_party/boringssl/ssl/ssl_file.c',
+ 'third_party/boringssl/ssl/ssl_lib.c',
+ 'third_party/boringssl/ssl/ssl_rsa.c',
+ 'third_party/boringssl/ssl/ssl_session.c',
+ 'third_party/boringssl/ssl/ssl_stat.c',
+ 'third_party/boringssl/ssl/t1_enc.c',
+ 'third_party/boringssl/ssl/t1_lib.c',
+ 'third_party/boringssl/ssl/tls_record.c',
+ ],
+ "include_dirs": [ "third_party/boringssl/include" ]
+ },
+ {
+ 'cflags': [
+ '-std=c99',
+ '-Wall',
+ '-Werror'
+ ],
+ 'target_name': 'z',
+ 'product_prefix': 'lib',
+ 'type': 'static_library',
+ 'dependencies': [
+ ],
+ 'sources': [
+ 'third_party/zlib/adler32.c',
+ 'third_party/zlib/compress.c',
+ 'third_party/zlib/crc32.c',
+ 'third_party/zlib/deflate.c',
+ 'third_party/zlib/gzclose.c',
+ 'third_party/zlib/gzlib.c',
+ 'third_party/zlib/gzread.c',
+ 'third_party/zlib/gzwrite.c',
+ 'third_party/zlib/infback.c',
+ 'third_party/zlib/inffast.c',
+ 'third_party/zlib/inflate.c',
+ 'third_party/zlib/inftrees.c',
+ 'third_party/zlib/trees.c',
+ 'third_party/zlib/uncompr.c',
+ 'third_party/zlib/zutil.c',
+ ],
+ "include_dirs": [ "third_party/boringssl/include" ]
+ },
+ ]
+ }]
+ ],
'targets': [
{
'cflags': [
@@ -147,7 +497,7 @@
'MACOSX_DEPLOYMENT_TARGET': '10.9'
}
}]
- ],
+ ]
},
{
'cflags': [
@@ -321,7 +671,7 @@
'MACOSX_DEPLOYMENT_TARGET': '10.9'
}
}]
- ],
+ ]
},
{
'include_dirs': [
@@ -340,13 +690,19 @@
'-g'
],
"conditions": [
- ['OS == "mac"', {
+ ['OS=="mac"', {
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'OTHER_CFLAGS': [
'-stdlib=libc++'
]
}
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ "boringssl",
+ "z",
+ ]
}]
],
"target_name": "grpc_node",
@@ -367,5 +723,16 @@
"gpr",
]
},
+ {
+ "target_name": "action_after_build",
+ "type": "none",
+ "dependencies": [ "<(module_name)" ],
+ "copies": [
+ {
+ "files": [ "<(PRODUCT_DIR)/<(module_name).node"],
+ "destination": "<(module_path)"
+ }
+ ]
+ }
]
}
diff --git a/build.yaml b/build.yaml
index 36b031003a..6cb861d52e 100644
--- a/build.yaml
+++ b/build.yaml
@@ -2602,6 +2602,8 @@ node_modules:
- deps:
- grpc
- gpr
+ - boringssl
+ - z
headers:
- src/node/ext/byte_buffer.h
- src/node/ext/call.h
diff --git a/include/grpc++/client_context.h b/include/grpc++/client_context.h
index 25eeb3876f..4e8776e3be 100644
--- a/include/grpc++/client_context.h
+++ b/include/grpc++/client_context.h
@@ -286,6 +286,7 @@ class ClientContext {
/// a client context is constructed and destructed.
class GlobalCallbacks {
public:
+ virtual ~GlobalCallbacks() {}
virtual void DefaultConstructor(ClientContext* context) = 0;
virtual void Destructor(ClientContext* context) = 0;
};
diff --git a/include/grpc++/server.h b/include/grpc++/server.h
index 644e66e6e0..c9371ba649 100644
--- a/include/grpc++/server.h
+++ b/include/grpc++/server.h
@@ -304,6 +304,8 @@ class Server GRPC_FINAL : public GrpcLibrary, private CallHook {
int num_running_cb_;
grpc::condition_variable callback_cv_;
+ std::shared_ptr<GlobalCallbacks> global_callbacks_;
+
std::list<SyncRequest>* sync_methods_;
std::unique_ptr<RpcServiceMethod> unknown_method_;
bool has_generic_service_;
diff --git a/package.json b/package.json
index 0b87f6a59d..2abc266d11 100644
--- a/package.json
+++ b/package.json
@@ -22,12 +22,14 @@
"lint": "node ./node_modules/jshint/bin/jshint src/node/src src/node/test src/node/interop src/node/index.js",
"test": "./node_modules/.bin/mocha src/node/test && npm run-script lint",
"gen_docs": "./node_modules/.bin/jsdoc -c src/node/jsdoc_conf.json",
- "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test"
+ "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test",
+ "preinstall": "npm install node-pre-gyp",
+ "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build"
},
"dependencies": {
- "bindings": "^1.2.0",
"lodash": "^3.9.3",
"nan": "^2.0.0",
+ "node-pre-gyp": "^0.6.19",
"protobufjs": "^4.0.0"
},
"devDependencies": {
@@ -45,6 +47,14 @@
"engines": {
"node": ">=0.10.13"
},
+ "binary": {
+ "module_name": "grpc_node",
+ "module_path": "./build/Release/",
+ "host": "https://storage.googleapis.com/",
+ "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}",
+ "package_name": "{node_abi}-{platform}-{arch}.tar.gz",
+ "module_path": "src/node/extension_binary"
+ },
"files": [
"LICENSE",
"src/node/README.md",
@@ -365,6 +375,32 @@
"src/core/census/operation.c",
"src/core/census/tag_set.c",
"src/core/census/tracing.c",
+ "third_party/zlib/crc32.h",
+ "third_party/zlib/deflate.h",
+ "third_party/zlib/gzguts.h",
+ "third_party/zlib/inffast.h",
+ "third_party/zlib/inffixed.h",
+ "third_party/zlib/inflate.h",
+ "third_party/zlib/inftrees.h",
+ "third_party/zlib/trees.h",
+ "third_party/zlib/zconf.h",
+ "third_party/zlib/zlib.h",
+ "third_party/zlib/zutil.h",
+ "third_party/zlib/adler32.c",
+ "third_party/zlib/compress.c",
+ "third_party/zlib/crc32.c",
+ "third_party/zlib/deflate.c",
+ "third_party/zlib/gzclose.c",
+ "third_party/zlib/gzlib.c",
+ "third_party/zlib/gzread.c",
+ "third_party/zlib/gzwrite.c",
+ "third_party/zlib/infback.c",
+ "third_party/zlib/inffast.c",
+ "third_party/zlib/inflate.c",
+ "third_party/zlib/inftrees.c",
+ "third_party/zlib/trees.c",
+ "third_party/zlib/uncompr.c",
+ "third_party/zlib/zutil.c",
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
@@ -444,6 +480,407 @@
"src/core/support/time_precise.c",
"src/core/support/time_win32.c",
"src/core/support/tls_pthread.c",
+ "third_party/boringssl/crypto/aes/internal.h",
+ "third_party/boringssl/crypto/asn1/asn1_locl.h",
+ "third_party/boringssl/crypto/bio/internal.h",
+ "third_party/boringssl/crypto/bn/internal.h",
+ "third_party/boringssl/crypto/bn/rsaz_exp.h",
+ "third_party/boringssl/crypto/bytestring/internal.h",
+ "third_party/boringssl/crypto/cipher/internal.h",
+ "third_party/boringssl/crypto/conf/conf_def.h",
+ "third_party/boringssl/crypto/conf/internal.h",
+ "third_party/boringssl/crypto/des/internal.h",
+ "third_party/boringssl/crypto/dh/internal.h",
+ "third_party/boringssl/crypto/digest/internal.h",
+ "third_party/boringssl/crypto/digest/md32_common.h",
+ "third_party/boringssl/crypto/directory.h",
+ "third_party/boringssl/crypto/dsa/internal.h",
+ "third_party/boringssl/crypto/ec/internal.h",
+ "third_party/boringssl/crypto/ec/p256-x86_64-table.h",
+ "third_party/boringssl/crypto/evp/internal.h",
+ "third_party/boringssl/crypto/internal.h",
+ "third_party/boringssl/crypto/modes/internal.h",
+ "third_party/boringssl/crypto/obj/obj_dat.h",
+ "third_party/boringssl/crypto/obj/obj_xref.h",
+ "third_party/boringssl/crypto/pkcs8/internal.h",
+ "third_party/boringssl/crypto/rand/internal.h",
+ "third_party/boringssl/crypto/rsa/internal.h",
+ "third_party/boringssl/crypto/test/scoped_types.h",
+ "third_party/boringssl/crypto/test/test_util.h",
+ "third_party/boringssl/crypto/x509/charmap.h",
+ "third_party/boringssl/crypto/x509/vpm_int.h",
+ "third_party/boringssl/crypto/x509v3/ext_dat.h",
+ "third_party/boringssl/crypto/x509v3/pcy_int.h",
+ "third_party/boringssl/include/openssl/aead.h",
+ "third_party/boringssl/include/openssl/aes.h",
+ "third_party/boringssl/include/openssl/arm_arch.h",
+ "third_party/boringssl/include/openssl/asn1.h",
+ "third_party/boringssl/include/openssl/asn1_mac.h",
+ "third_party/boringssl/include/openssl/asn1t.h",
+ "third_party/boringssl/include/openssl/base.h",
+ "third_party/boringssl/include/openssl/base64.h",
+ "third_party/boringssl/include/openssl/bio.h",
+ "third_party/boringssl/include/openssl/blowfish.h",
+ "third_party/boringssl/include/openssl/bn.h",
+ "third_party/boringssl/include/openssl/buf.h",
+ "third_party/boringssl/include/openssl/buffer.h",
+ "third_party/boringssl/include/openssl/bytestring.h",
+ "third_party/boringssl/include/openssl/cast.h",
+ "third_party/boringssl/include/openssl/chacha.h",
+ "third_party/boringssl/include/openssl/cipher.h",
+ "third_party/boringssl/include/openssl/cmac.h",
+ "third_party/boringssl/include/openssl/conf.h",
+ "third_party/boringssl/include/openssl/cpu.h",
+ "third_party/boringssl/include/openssl/crypto.h",
+ "third_party/boringssl/include/openssl/curve25519.h",
+ "third_party/boringssl/include/openssl/des.h",
+ "third_party/boringssl/include/openssl/dh.h",
+ "third_party/boringssl/include/openssl/digest.h",
+ "third_party/boringssl/include/openssl/dsa.h",
+ "third_party/boringssl/include/openssl/dtls1.h",
+ "third_party/boringssl/include/openssl/ec.h",
+ "third_party/boringssl/include/openssl/ec_key.h",
+ "third_party/boringssl/include/openssl/ecdh.h",
+ "third_party/boringssl/include/openssl/ecdsa.h",
+ "third_party/boringssl/include/openssl/engine.h",
+ "third_party/boringssl/include/openssl/err.h",
+ "third_party/boringssl/include/openssl/evp.h",
+ "third_party/boringssl/include/openssl/ex_data.h",
+ "third_party/boringssl/include/openssl/hkdf.h",
+ "third_party/boringssl/include/openssl/hmac.h",
+ "third_party/boringssl/include/openssl/lhash.h",
+ "third_party/boringssl/include/openssl/lhash_macros.h",
+ "third_party/boringssl/include/openssl/md4.h",
+ "third_party/boringssl/include/openssl/md5.h",
+ "third_party/boringssl/include/openssl/mem.h",
+ "third_party/boringssl/include/openssl/obj.h",
+ "third_party/boringssl/include/openssl/obj_mac.h",
+ "third_party/boringssl/include/openssl/objects.h",
+ "third_party/boringssl/include/openssl/opensslfeatures.h",
+ "third_party/boringssl/include/openssl/opensslv.h",
+ "third_party/boringssl/include/openssl/ossl_typ.h",
+ "third_party/boringssl/include/openssl/pem.h",
+ "third_party/boringssl/include/openssl/pkcs12.h",
+ "third_party/boringssl/include/openssl/pkcs7.h",
+ "third_party/boringssl/include/openssl/pkcs8.h",
+ "third_party/boringssl/include/openssl/poly1305.h",
+ "third_party/boringssl/include/openssl/pqueue.h",
+ "third_party/boringssl/include/openssl/rand.h",
+ "third_party/boringssl/include/openssl/rc4.h",
+ "third_party/boringssl/include/openssl/rsa.h",
+ "third_party/boringssl/include/openssl/safestack.h",
+ "third_party/boringssl/include/openssl/sha.h",
+ "third_party/boringssl/include/openssl/srtp.h",
+ "third_party/boringssl/include/openssl/ssl.h",
+ "third_party/boringssl/include/openssl/ssl3.h",
+ "third_party/boringssl/include/openssl/stack.h",
+ "third_party/boringssl/include/openssl/stack_macros.h",
+ "third_party/boringssl/include/openssl/thread.h",
+ "third_party/boringssl/include/openssl/time_support.h",
+ "third_party/boringssl/include/openssl/tls1.h",
+ "third_party/boringssl/include/openssl/type_check.h",
+ "third_party/boringssl/include/openssl/x509.h",
+ "third_party/boringssl/include/openssl/x509_vfy.h",
+ "third_party/boringssl/include/openssl/x509v3.h",
+ "third_party/boringssl/ssl/internal.h",
+ "third_party/boringssl/ssl/test/async_bio.h",
+ "third_party/boringssl/ssl/test/packeted_bio.h",
+ "third_party/boringssl/ssl/test/scoped_types.h",
+ "third_party/boringssl/ssl/test/test_config.h",
+ "src/boringssl/err_data.c",
+ "third_party/boringssl/crypto/aes/aes.c",
+ "third_party/boringssl/crypto/aes/mode_wrappers.c",
+ "third_party/boringssl/crypto/asn1/a_bitstr.c",
+ "third_party/boringssl/crypto/asn1/a_bool.c",
+ "third_party/boringssl/crypto/asn1/a_bytes.c",
+ "third_party/boringssl/crypto/asn1/a_d2i_fp.c",
+ "third_party/boringssl/crypto/asn1/a_dup.c",
+ "third_party/boringssl/crypto/asn1/a_enum.c",
+ "third_party/boringssl/crypto/asn1/a_gentm.c",
+ "third_party/boringssl/crypto/asn1/a_i2d_fp.c",
+ "third_party/boringssl/crypto/asn1/a_int.c",
+ "third_party/boringssl/crypto/asn1/a_mbstr.c",
+ "third_party/boringssl/crypto/asn1/a_object.c",
+ "third_party/boringssl/crypto/asn1/a_octet.c",
+ "third_party/boringssl/crypto/asn1/a_print.c",
+ "third_party/boringssl/crypto/asn1/a_strnid.c",
+ "third_party/boringssl/crypto/asn1/a_time.c",
+ "third_party/boringssl/crypto/asn1/a_type.c",
+ "third_party/boringssl/crypto/asn1/a_utctm.c",
+ "third_party/boringssl/crypto/asn1/a_utf8.c",
+ "third_party/boringssl/crypto/asn1/asn1_lib.c",
+ "third_party/boringssl/crypto/asn1/asn1_par.c",
+ "third_party/boringssl/crypto/asn1/asn_pack.c",
+ "third_party/boringssl/crypto/asn1/bio_asn1.c",
+ "third_party/boringssl/crypto/asn1/bio_ndef.c",
+ "third_party/boringssl/crypto/asn1/f_enum.c",
+ "third_party/boringssl/crypto/asn1/f_int.c",
+ "third_party/boringssl/crypto/asn1/f_string.c",
+ "third_party/boringssl/crypto/asn1/t_bitst.c",
+ "third_party/boringssl/crypto/asn1/t_pkey.c",
+ "third_party/boringssl/crypto/asn1/tasn_dec.c",
+ "third_party/boringssl/crypto/asn1/tasn_enc.c",
+ "third_party/boringssl/crypto/asn1/tasn_fre.c",
+ "third_party/boringssl/crypto/asn1/tasn_new.c",
+ "third_party/boringssl/crypto/asn1/tasn_prn.c",
+ "third_party/boringssl/crypto/asn1/tasn_typ.c",
+ "third_party/boringssl/crypto/asn1/tasn_utl.c",
+ "third_party/boringssl/crypto/asn1/x_bignum.c",
+ "third_party/boringssl/crypto/asn1/x_long.c",
+ "third_party/boringssl/crypto/base64/base64.c",
+ "third_party/boringssl/crypto/bio/bio.c",
+ "third_party/boringssl/crypto/bio/bio_mem.c",
+ "third_party/boringssl/crypto/bio/buffer.c",
+ "third_party/boringssl/crypto/bio/connect.c",
+ "third_party/boringssl/crypto/bio/fd.c",
+ "third_party/boringssl/crypto/bio/file.c",
+ "third_party/boringssl/crypto/bio/hexdump.c",
+ "third_party/boringssl/crypto/bio/pair.c",
+ "third_party/boringssl/crypto/bio/printf.c",
+ "third_party/boringssl/crypto/bio/socket.c",
+ "third_party/boringssl/crypto/bio/socket_helper.c",
+ "third_party/boringssl/crypto/bn/add.c",
+ "third_party/boringssl/crypto/bn/asm/x86_64-gcc.c",
+ "third_party/boringssl/crypto/bn/bn.c",
+ "third_party/boringssl/crypto/bn/bn_asn1.c",
+ "third_party/boringssl/crypto/bn/cmp.c",
+ "third_party/boringssl/crypto/bn/convert.c",
+ "third_party/boringssl/crypto/bn/ctx.c",
+ "third_party/boringssl/crypto/bn/div.c",
+ "third_party/boringssl/crypto/bn/exponentiation.c",
+ "third_party/boringssl/crypto/bn/gcd.c",
+ "third_party/boringssl/crypto/bn/generic.c",
+ "third_party/boringssl/crypto/bn/kronecker.c",
+ "third_party/boringssl/crypto/bn/montgomery.c",
+ "third_party/boringssl/crypto/bn/mul.c",
+ "third_party/boringssl/crypto/bn/prime.c",
+ "third_party/boringssl/crypto/bn/random.c",
+ "third_party/boringssl/crypto/bn/rsaz_exp.c",
+ "third_party/boringssl/crypto/bn/shift.c",
+ "third_party/boringssl/crypto/bn/sqrt.c",
+ "third_party/boringssl/crypto/buf/buf.c",
+ "third_party/boringssl/crypto/bytestring/ber.c",
+ "third_party/boringssl/crypto/bytestring/cbb.c",
+ "third_party/boringssl/crypto/bytestring/cbs.c",
+ "third_party/boringssl/crypto/chacha/chacha_generic.c",
+ "third_party/boringssl/crypto/chacha/chacha_vec.c",
+ "third_party/boringssl/crypto/cipher/aead.c",
+ "third_party/boringssl/crypto/cipher/cipher.c",
+ "third_party/boringssl/crypto/cipher/derive_key.c",
+ "third_party/boringssl/crypto/cipher/e_aes.c",
+ "third_party/boringssl/crypto/cipher/e_chacha20poly1305.c",
+ "third_party/boringssl/crypto/cipher/e_des.c",
+ "third_party/boringssl/crypto/cipher/e_null.c",
+ "third_party/boringssl/crypto/cipher/e_rc2.c",
+ "third_party/boringssl/crypto/cipher/e_rc4.c",
+ "third_party/boringssl/crypto/cipher/e_ssl3.c",
+ "third_party/boringssl/crypto/cipher/e_tls.c",
+ "third_party/boringssl/crypto/cipher/tls_cbc.c",
+ "third_party/boringssl/crypto/cmac/cmac.c",
+ "third_party/boringssl/crypto/conf/conf.c",
+ "third_party/boringssl/crypto/cpu-arm.c",
+ "third_party/boringssl/crypto/cpu-intel.c",
+ "third_party/boringssl/crypto/crypto.c",
+ "third_party/boringssl/crypto/curve25519/curve25519.c",
+ "third_party/boringssl/crypto/des/des.c",
+ "third_party/boringssl/crypto/dh/check.c",
+ "third_party/boringssl/crypto/dh/dh.c",
+ "third_party/boringssl/crypto/dh/dh_asn1.c",
+ "third_party/boringssl/crypto/dh/params.c",
+ "third_party/boringssl/crypto/digest/digest.c",
+ "third_party/boringssl/crypto/digest/digests.c",
+ "third_party/boringssl/crypto/directory_posix.c",
+ "third_party/boringssl/crypto/directory_win.c",
+ "third_party/boringssl/crypto/dsa/dsa.c",
+ "third_party/boringssl/crypto/dsa/dsa_asn1.c",
+ "third_party/boringssl/crypto/ec/ec.c",
+ "third_party/boringssl/crypto/ec/ec_asn1.c",
+ "third_party/boringssl/crypto/ec/ec_key.c",
+ "third_party/boringssl/crypto/ec/ec_montgomery.c",
+ "third_party/boringssl/crypto/ec/oct.c",
+ "third_party/boringssl/crypto/ec/p224-64.c",
+ "third_party/boringssl/crypto/ec/p256-64.c",
+ "third_party/boringssl/crypto/ec/p256-x86_64.c",
+ "third_party/boringssl/crypto/ec/simple.c",
+ "third_party/boringssl/crypto/ec/util-64.c",
+ "third_party/boringssl/crypto/ec/wnaf.c",
+ "third_party/boringssl/crypto/ecdh/ecdh.c",
+ "third_party/boringssl/crypto/ecdsa/ecdsa.c",
+ "third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c",
+ "third_party/boringssl/crypto/engine/engine.c",
+ "third_party/boringssl/crypto/err/err.c",
+ "third_party/boringssl/crypto/evp/algorithm.c",
+ "third_party/boringssl/crypto/evp/digestsign.c",
+ "third_party/boringssl/crypto/evp/evp.c",
+ "third_party/boringssl/crypto/evp/evp_asn1.c",
+ "third_party/boringssl/crypto/evp/evp_ctx.c",
+ "third_party/boringssl/crypto/evp/p_dsa_asn1.c",
+ "third_party/boringssl/crypto/evp/p_ec.c",
+ "third_party/boringssl/crypto/evp/p_ec_asn1.c",
+ "third_party/boringssl/crypto/evp/p_rsa.c",
+ "third_party/boringssl/crypto/evp/p_rsa_asn1.c",
+ "third_party/boringssl/crypto/evp/pbkdf.c",
+ "third_party/boringssl/crypto/evp/sign.c",
+ "third_party/boringssl/crypto/ex_data.c",
+ "third_party/boringssl/crypto/hkdf/hkdf.c",
+ "third_party/boringssl/crypto/hmac/hmac.c",
+ "third_party/boringssl/crypto/lhash/lhash.c",
+ "third_party/boringssl/crypto/md4/md4.c",
+ "third_party/boringssl/crypto/md5/md5.c",
+ "third_party/boringssl/crypto/mem.c",
+ "third_party/boringssl/crypto/modes/cbc.c",
+ "third_party/boringssl/crypto/modes/cfb.c",
+ "third_party/boringssl/crypto/modes/ctr.c",
+ "third_party/boringssl/crypto/modes/gcm.c",
+ "third_party/boringssl/crypto/modes/ofb.c",
+ "third_party/boringssl/crypto/obj/obj.c",
+ "third_party/boringssl/crypto/obj/obj_xref.c",
+ "third_party/boringssl/crypto/pem/pem_all.c",
+ "third_party/boringssl/crypto/pem/pem_info.c",
+ "third_party/boringssl/crypto/pem/pem_lib.c",
+ "third_party/boringssl/crypto/pem/pem_oth.c",
+ "third_party/boringssl/crypto/pem/pem_pk8.c",
+ "third_party/boringssl/crypto/pem/pem_pkey.c",
+ "third_party/boringssl/crypto/pem/pem_x509.c",
+ "third_party/boringssl/crypto/pem/pem_xaux.c",
+ "third_party/boringssl/crypto/pkcs8/p5_pbe.c",
+ "third_party/boringssl/crypto/pkcs8/p5_pbev2.c",
+ "third_party/boringssl/crypto/pkcs8/p8_pkey.c",
+ "third_party/boringssl/crypto/pkcs8/pkcs8.c",
+ "third_party/boringssl/crypto/poly1305/poly1305.c",
+ "third_party/boringssl/crypto/poly1305/poly1305_arm.c",
+ "third_party/boringssl/crypto/poly1305/poly1305_vec.c",
+ "third_party/boringssl/crypto/rand/rand.c",
+ "third_party/boringssl/crypto/rand/urandom.c",
+ "third_party/boringssl/crypto/rand/windows.c",
+ "third_party/boringssl/crypto/rc4/rc4.c",
+ "third_party/boringssl/crypto/refcount_c11.c",
+ "third_party/boringssl/crypto/refcount_lock.c",
+ "third_party/boringssl/crypto/rsa/blinding.c",
+ "third_party/boringssl/crypto/rsa/padding.c",
+ "third_party/boringssl/crypto/rsa/rsa.c",
+ "third_party/boringssl/crypto/rsa/rsa_asn1.c",
+ "third_party/boringssl/crypto/rsa/rsa_impl.c",
+ "third_party/boringssl/crypto/sha/sha1.c",
+ "third_party/boringssl/crypto/sha/sha256.c",
+ "third_party/boringssl/crypto/sha/sha512.c",
+ "third_party/boringssl/crypto/stack/stack.c",
+ "third_party/boringssl/crypto/thread.c",
+ "third_party/boringssl/crypto/thread_none.c",
+ "third_party/boringssl/crypto/thread_pthread.c",
+ "third_party/boringssl/crypto/thread_win.c",
+ "third_party/boringssl/crypto/time_support.c",
+ "third_party/boringssl/crypto/x509/a_digest.c",
+ "third_party/boringssl/crypto/x509/a_sign.c",
+ "third_party/boringssl/crypto/x509/a_strex.c",
+ "third_party/boringssl/crypto/x509/a_verify.c",
+ "third_party/boringssl/crypto/x509/asn1_gen.c",
+ "third_party/boringssl/crypto/x509/by_dir.c",
+ "third_party/boringssl/crypto/x509/by_file.c",
+ "third_party/boringssl/crypto/x509/i2d_pr.c",
+ "third_party/boringssl/crypto/x509/pkcs7.c",
+ "third_party/boringssl/crypto/x509/t_crl.c",
+ "third_party/boringssl/crypto/x509/t_req.c",
+ "third_party/boringssl/crypto/x509/t_x509.c",
+ "third_party/boringssl/crypto/x509/t_x509a.c",
+ "third_party/boringssl/crypto/x509/x509.c",
+ "third_party/boringssl/crypto/x509/x509_att.c",
+ "third_party/boringssl/crypto/x509/x509_cmp.c",
+ "third_party/boringssl/crypto/x509/x509_d2.c",
+ "third_party/boringssl/crypto/x509/x509_def.c",
+ "third_party/boringssl/crypto/x509/x509_ext.c",
+ "third_party/boringssl/crypto/x509/x509_lu.c",
+ "third_party/boringssl/crypto/x509/x509_obj.c",
+ "third_party/boringssl/crypto/x509/x509_r2x.c",
+ "third_party/boringssl/crypto/x509/x509_req.c",
+ "third_party/boringssl/crypto/x509/x509_set.c",
+ "third_party/boringssl/crypto/x509/x509_trs.c",
+ "third_party/boringssl/crypto/x509/x509_txt.c",
+ "third_party/boringssl/crypto/x509/x509_v3.c",
+ "third_party/boringssl/crypto/x509/x509_vfy.c",
+ "third_party/boringssl/crypto/x509/x509_vpm.c",
+ "third_party/boringssl/crypto/x509/x509cset.c",
+ "third_party/boringssl/crypto/x509/x509name.c",
+ "third_party/boringssl/crypto/x509/x509rset.c",
+ "third_party/boringssl/crypto/x509/x509spki.c",
+ "third_party/boringssl/crypto/x509/x509type.c",
+ "third_party/boringssl/crypto/x509/x_algor.c",
+ "third_party/boringssl/crypto/x509/x_all.c",
+ "third_party/boringssl/crypto/x509/x_attrib.c",
+ "third_party/boringssl/crypto/x509/x_crl.c",
+ "third_party/boringssl/crypto/x509/x_exten.c",
+ "third_party/boringssl/crypto/x509/x_info.c",
+ "third_party/boringssl/crypto/x509/x_name.c",
+ "third_party/boringssl/crypto/x509/x_pkey.c",
+ "third_party/boringssl/crypto/x509/x_pubkey.c",
+ "third_party/boringssl/crypto/x509/x_req.c",
+ "third_party/boringssl/crypto/x509/x_sig.c",
+ "third_party/boringssl/crypto/x509/x_spki.c",
+ "third_party/boringssl/crypto/x509/x_val.c",
+ "third_party/boringssl/crypto/x509/x_x509.c",
+ "third_party/boringssl/crypto/x509/x_x509a.c",
+ "third_party/boringssl/crypto/x509v3/pcy_cache.c",
+ "third_party/boringssl/crypto/x509v3/pcy_data.c",
+ "third_party/boringssl/crypto/x509v3/pcy_lib.c",
+ "third_party/boringssl/crypto/x509v3/pcy_map.c",
+ "third_party/boringssl/crypto/x509v3/pcy_node.c",
+ "third_party/boringssl/crypto/x509v3/pcy_tree.c",
+ "third_party/boringssl/crypto/x509v3/v3_akey.c",
+ "third_party/boringssl/crypto/x509v3/v3_akeya.c",
+ "third_party/boringssl/crypto/x509v3/v3_alt.c",
+ "third_party/boringssl/crypto/x509v3/v3_bcons.c",
+ "third_party/boringssl/crypto/x509v3/v3_bitst.c",
+ "third_party/boringssl/crypto/x509v3/v3_conf.c",
+ "third_party/boringssl/crypto/x509v3/v3_cpols.c",
+ "third_party/boringssl/crypto/x509v3/v3_crld.c",
+ "third_party/boringssl/crypto/x509v3/v3_enum.c",
+ "third_party/boringssl/crypto/x509v3/v3_extku.c",
+ "third_party/boringssl/crypto/x509v3/v3_genn.c",
+ "third_party/boringssl/crypto/x509v3/v3_ia5.c",
+ "third_party/boringssl/crypto/x509v3/v3_info.c",
+ "third_party/boringssl/crypto/x509v3/v3_int.c",
+ "third_party/boringssl/crypto/x509v3/v3_lib.c",
+ "third_party/boringssl/crypto/x509v3/v3_ncons.c",
+ "third_party/boringssl/crypto/x509v3/v3_pci.c",
+ "third_party/boringssl/crypto/x509v3/v3_pcia.c",
+ "third_party/boringssl/crypto/x509v3/v3_pcons.c",
+ "third_party/boringssl/crypto/x509v3/v3_pku.c",
+ "third_party/boringssl/crypto/x509v3/v3_pmaps.c",
+ "third_party/boringssl/crypto/x509v3/v3_prn.c",
+ "third_party/boringssl/crypto/x509v3/v3_purp.c",
+ "third_party/boringssl/crypto/x509v3/v3_skey.c",
+ "third_party/boringssl/crypto/x509v3/v3_sxnet.c",
+ "third_party/boringssl/crypto/x509v3/v3_utl.c",
+ "third_party/boringssl/ssl/custom_extensions.c",
+ "third_party/boringssl/ssl/d1_both.c",
+ "third_party/boringssl/ssl/d1_clnt.c",
+ "third_party/boringssl/ssl/d1_lib.c",
+ "third_party/boringssl/ssl/d1_meth.c",
+ "third_party/boringssl/ssl/d1_pkt.c",
+ "third_party/boringssl/ssl/d1_srtp.c",
+ "third_party/boringssl/ssl/d1_srvr.c",
+ "third_party/boringssl/ssl/dtls_record.c",
+ "third_party/boringssl/ssl/pqueue/pqueue.c",
+ "third_party/boringssl/ssl/s3_both.c",
+ "third_party/boringssl/ssl/s3_clnt.c",
+ "third_party/boringssl/ssl/s3_enc.c",
+ "third_party/boringssl/ssl/s3_lib.c",
+ "third_party/boringssl/ssl/s3_meth.c",
+ "third_party/boringssl/ssl/s3_pkt.c",
+ "third_party/boringssl/ssl/s3_srvr.c",
+ "third_party/boringssl/ssl/ssl_aead_ctx.c",
+ "third_party/boringssl/ssl/ssl_asn1.c",
+ "third_party/boringssl/ssl/ssl_buffer.c",
+ "third_party/boringssl/ssl/ssl_cert.c",
+ "third_party/boringssl/ssl/ssl_cipher.c",
+ "third_party/boringssl/ssl/ssl_file.c",
+ "third_party/boringssl/ssl/ssl_lib.c",
+ "third_party/boringssl/ssl/ssl_rsa.c",
+ "third_party/boringssl/ssl/ssl_session.c",
+ "third_party/boringssl/ssl/ssl_stat.c",
+ "third_party/boringssl/ssl/t1_enc.c",
+ "third_party/boringssl/ssl/t1_lib.c",
+ "third_party/boringssl/ssl/tls_record.c",
"binding.gyp"
],
"main": "src/node/index.js",
diff --git a/src/core/surface/init.c b/src/core/surface/init.c
index 19cea4c4f6..e3ab70dba7 100644
--- a/src/core/surface/init.c
+++ b/src/core/surface/init.c
@@ -117,8 +117,10 @@ void grpc_init(void) {
grpc_iomgr_init();
grpc_executor_init();
grpc_tracer_init("GRPC_TRACE");
- /* Only initialize census if noone else has. */
- if (census_enabled() == CENSUS_FEATURE_NONE) {
+ /* Only initialize census if no one else has and some features are
+ * available. */
+ if (census_enabled() == CENSUS_FEATURE_NONE &&
+ census_supported() != CENSUS_FEATURE_NONE) {
if (census_initialize(census_supported())) { /* enable all features. */
gpr_log(GPR_ERROR, "Could not initialize census.");
}
diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc
index 2aa532808c..710d7cb5c2 100644
--- a/src/cpp/client/client_context.cc
+++ b/src/cpp/client/client_context.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@ namespace grpc {
class DefaultGlobalClientCallbacks GRPC_FINAL
: public ClientContext::GlobalCallbacks {
public:
+ ~DefaultGlobalClientCallbacks() GRPC_OVERRIDE {}
void DefaultConstructor(ClientContext* context) GRPC_OVERRIDE {}
void Destructor(ClientContext* context) GRPC_OVERRIDE {}
};
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc
index 878775bbee..3bf9f3fa0f 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server.cc
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -53,17 +53,17 @@ namespace grpc {
class DefaultGlobalCallbacks GRPC_FINAL : public Server::GlobalCallbacks {
public:
+ ~DefaultGlobalCallbacks() GRPC_OVERRIDE {}
void PreSynchronousRequest(ServerContext* context) GRPC_OVERRIDE {}
void PostSynchronousRequest(ServerContext* context) GRPC_OVERRIDE {}
};
-static Server::GlobalCallbacks* g_callbacks = nullptr;
+static std::shared_ptr<Server::GlobalCallbacks> g_callbacks = nullptr;
static gpr_once g_once_init_callbacks = GPR_ONCE_INIT;
static void InitGlobalCallbacks() {
if (g_callbacks == nullptr) {
- static DefaultGlobalCallbacks default_global_callbacks;
- g_callbacks = &default_global_callbacks;
+ g_callbacks.reset(new DefaultGlobalCallbacks());
}
}
@@ -234,12 +234,12 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
}
}
- void Run() {
+ void Run(std::shared_ptr<GlobalCallbacks> global_callbacks) {
ctx_.BeginCompletionOp(&call_);
- g_callbacks->PreSynchronousRequest(&ctx_);
+ global_callbacks->PreSynchronousRequest(&ctx_);
method_->handler()->RunHandler(MethodHandler::HandlerParameter(
&call_, &ctx_, request_payload_, call_.max_message_size()));
- g_callbacks->PostSynchronousRequest(&ctx_);
+ global_callbacks->PostSynchronousRequest(&ctx_);
request_payload_ = nullptr;
void* ignored_tag;
bool ignored_ok;
@@ -287,6 +287,7 @@ Server::Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned,
thread_pool_(thread_pool),
thread_pool_owned_(thread_pool_owned) {
gpr_once_init(&g_once_init_callbacks, InitGlobalCallbacks);
+ global_callbacks_ = g_callbacks;
grpc_server_register_completion_queue(server_, cq_.cq(), nullptr);
}
@@ -311,7 +312,7 @@ Server::~Server() {
void Server::SetGlobalCallbacks(GlobalCallbacks* callbacks) {
GPR_ASSERT(g_callbacks == nullptr);
GPR_ASSERT(callbacks != nullptr);
- g_callbacks = callbacks;
+ g_callbacks.reset(callbacks);
}
bool Server::RegisterService(const grpc::string* host, RpcService* service) {
@@ -569,7 +570,7 @@ void Server::RunRpc() {
}
}
GPR_TIMER_SCOPE("cd.Run()", 0);
- cd.Run();
+ cd.Run(global_callbacks_);
}
}
diff --git a/src/node/index.js b/src/node/index.js
index 0d1a7fd887..7eacdc67b1 100644
--- a/src/node/index.js
+++ b/src/node/index.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@ var server = require('./src/server.js');
var Metadata = require('./src/metadata.js');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./src/grpc_extension');
/**
* Load a gRPC object from an existing ProtoBuf.Reflect object.
diff --git a/src/node/src/client.js b/src/node/src/client.js
index d57826781d..b5247a69ee 100644
--- a/src/node/src/client.js
+++ b/src/node/src/client.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@
var _ = require('lodash');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./grpc_extension');
var common = require('./common');
diff --git a/src/node/src/credentials.js b/src/node/src/credentials.js
index dcbfac18f4..710ab6d879 100644
--- a/src/node/src/credentials.js
+++ b/src/node/src/credentials.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,7 @@
'use strict';
-var grpc = require('bindings')('grpc_node.node');
+var grpc = require('./grpc_extension');
var CallCredentials = grpc.CallCredentials;
diff --git a/src/node/src/grpc_extension.js b/src/node/src/grpc_extension.js
new file mode 100644
index 0000000000..d4eca65fcb
--- /dev/null
+++ b/src/node/src/grpc_extension.js
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright 2016, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+var binary = require('node-pre-gyp');
+var path = require('path');
+var binding_path = binary.find(path.resolve(
+ path.join(__dirname,'../../../package.json')));
+var binding = require(binding_path);
+
+module.exports = binding;
diff --git a/src/node/src/metadata.js b/src/node/src/metadata.js
index fef79f959e..51a9f8a216 100644
--- a/src/node/src/metadata.js
+++ b/src/node/src/metadata.js
@@ -49,7 +49,7 @@
var _ = require('lodash');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./grpc_extension');
/**
* Class for storing metadata. Keys are normalized to lowercase ASCII.
diff --git a/src/node/src/server.js b/src/node/src/server.js
index ceaa9f5d1f..e5aadcd565 100644
--- a/src/node/src/server.js
+++ b/src/node/src/server.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@
var _ = require('lodash');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('./grpc_extension');
var common = require('./common');
diff --git a/src/node/test/call_test.js b/src/node/test/call_test.js
index f1f86b35db..2300096d03 100644
--- a/src/node/test/call_test.js
+++ b/src/node/test/call_test.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
'use strict';
var assert = require('assert');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('../src/grpc_extension');
/**
* Helper function to return an absolute deadline given a relative timeout in
diff --git a/src/node/test/channel_test.js b/src/node/test/channel_test.js
index 7163a5fb5e..c0ae2b769a 100644
--- a/src/node/test/channel_test.js
+++ b/src/node/test/channel_test.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
'use strict';
var assert = require('assert');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('../src/grpc_extension');
/**
* This is used for testing functions with multiple asynchronous calls that
diff --git a/src/node/test/constant_test.js b/src/node/test/constant_test.js
index b17cd339cb..712c70706d 100644
--- a/src/node/test/constant_test.js
+++ b/src/node/test/constant_test.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
'use strict';
var assert = require('assert');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('../src/grpc_extension');
/**
* List of all status names
diff --git a/src/node/test/end_to_end_test.js b/src/node/test/end_to_end_test.js
index 0f6c5941c4..353c6c761d 100644
--- a/src/node/test/end_to_end_test.js
+++ b/src/node/test/end_to_end_test.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
'use strict';
var assert = require('assert');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('../src/grpc_extension');
/**
* This is used for testing functions with multiple asynchronous calls that
diff --git a/src/node/test/server_test.js b/src/node/test/server_test.js
index 592f47e145..71a9647184 100644
--- a/src/node/test/server_test.js
+++ b/src/node/test/server_test.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,7 +36,7 @@
var assert = require('assert');
var fs = require('fs');
var path = require('path');
-var grpc = require('bindings')('grpc_node');
+var grpc = require('../src/grpc_extension');
describe('server', function() {
describe('constructor', function() {
diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js
index fc765ed731..c65d95f767 100644
--- a/src/node/test/surface_test.js
+++ b/src/node/test/surface_test.js
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -952,6 +952,7 @@ describe('Call propagation', function() {
describe('Cancellation', function() {
it('With a unary call', function(done) {
done = multiDone(done, 2);
+ var call;
proxy_impl.unary = function(parent, callback) {
client.unary(parent.request, function(err, value) {
try {
@@ -969,12 +970,13 @@ describe('Call propagation', function() {
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
grpc.credentials.createInsecure());
- var call = proxy_client.unary({}, function(err, value) {
+ call = proxy_client.unary({}, function(err, value) {
done();
});
});
it('With a client stream call', function(done) {
done = multiDone(done, 2);
+ var call;
proxy_impl.clientStream = function(parent, callback) {
client.clientStream(function(err, value) {
try {
@@ -992,12 +994,13 @@ describe('Call propagation', function() {
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
grpc.credentials.createInsecure());
- var call = proxy_client.clientStream(function(err, value) {
+ call = proxy_client.clientStream(function(err, value) {
done();
});
});
it('With a server stream call', function(done) {
done = multiDone(done, 2);
+ var call;
proxy_impl.serverStream = function(parent) {
var child = client.serverStream(parent.request, null,
{parent: parent});
@@ -1013,13 +1016,14 @@ describe('Call propagation', function() {
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
grpc.credentials.createInsecure());
- var call = proxy_client.serverStream({});
+ call = proxy_client.serverStream({});
call.on('error', function(err) {
done();
});
});
it('With a bidi stream call', function(done) {
done = multiDone(done, 2);
+ var call;
proxy_impl.bidiStream = function(parent) {
var child = client.bidiStream(null, {parent: parent});
child.on('error', function(err) {
@@ -1034,7 +1038,7 @@ describe('Call propagation', function() {
proxy.start();
var proxy_client = new Client('localhost:' + proxy_port,
grpc.credentials.createInsecure());
- var call = proxy_client.bidiStream();
+ call = proxy_client.bidiStream();
call.on('error', function(err) {
done();
});
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index ff35c45861..29b506abe0 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -41,6 +41,8 @@ from setuptools.command import build_ext
from setuptools.command import build_py
from setuptools.command import test
+import support
+
PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
CONF_PY_ADDENDUM = """
diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c
index 43adafb73f..8f33d72417 100644
--- a/src/ruby/ext/grpc/rb_call.c
+++ b/src/ruby/ext/grpc/rb_call.c
@@ -525,12 +525,12 @@ typedef struct run_batch_stack {
grpc_status_code recv_status;
char *recv_status_details;
size_t recv_status_details_capacity;
- uint write_flag;
+ unsigned write_flag;
} run_batch_stack;
/* grpc_run_batch_stack_init ensures the run_batch_stack is properly
* initialized */
-static void grpc_run_batch_stack_init(run_batch_stack *st, uint write_flag) {
+static void grpc_run_batch_stack_init(run_batch_stack *st, unsigned write_flag) {
MEMZERO(st, run_batch_stack, 1);
grpc_metadata_array_init(&st->send_metadata);
grpc_metadata_array_init(&st->send_trailing_metadata);
@@ -696,7 +696,7 @@ static VALUE grpc_rb_call_run_batch(VALUE self, VALUE cqueue, VALUE tag,
grpc_call_error err;
VALUE result = Qnil;
VALUE rb_write_flag = rb_ivar_get(self, id_write_flag);
- uint write_flag = 0;
+ unsigned write_flag = 0;
TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call);
/* Validate the ops args, adding them to a ruby array */
diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c
index 4d719d7541..ebcc6592c2 100644
--- a/src/ruby/ext/grpc/rb_call_credentials.c
+++ b/src/ruby/ext/grpc/rb_call_credentials.c
@@ -79,6 +79,7 @@ static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) {
static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
VALUE exception_object) {
VALUE result = rb_hash_new();
+ (void)args;
rb_hash_aset(result, rb_str_new2("metadata"), Qnil);
/* Currently only gives the exception class name. It should be possible get
more details */
@@ -132,6 +133,7 @@ static void grpc_rb_call_credentials_plugin_get_metadata(
}
static void grpc_rb_call_credentials_plugin_destroy(void *state) {
+ (void)state;
// Not sure what needs to be done here
}
diff --git a/src/ruby/ext/grpc/rb_event_thread.c b/src/ruby/ext/grpc/rb_event_thread.c
index 95af091317..516f0bdad2 100644
--- a/src/ruby/ext/grpc/rb_event_thread.c
+++ b/src/ruby/ext/grpc/rb_event_thread.c
@@ -102,6 +102,7 @@ static void grpc_rb_event_queue_destroy() {
static void *grpc_rb_wait_for_event_no_gil(void *param) {
grpc_rb_event *event = NULL;
+ (void)param;
gpr_mu_lock(&event_queue.mu);
while ((event = grpc_rb_event_queue_dequeue()) == NULL) {
gpr_cv_wait(&event_queue.cv,
@@ -117,6 +118,7 @@ static void *grpc_rb_wait_for_event_no_gil(void *param) {
}
static void grpc_rb_event_unblocking_func(void *arg) {
+ (void)arg;
gpr_mu_lock(&event_queue.mu);
event_queue.abort = true;
gpr_cv_signal(&event_queue.cv);
@@ -127,6 +129,7 @@ static void grpc_rb_event_unblocking_func(void *arg) {
* events */
static VALUE grpc_rb_event_thread(VALUE arg) {
grpc_rb_event *event;
+ (void)arg;
while(true) {
event = (grpc_rb_event*)rb_thread_call_without_gvl(
grpc_rb_wait_for_event_no_gil, NULL,
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 91f26a37d5..57a0815193 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -130,26 +130,44 @@
prefix ?= /usr/local
- PROTOC = protoc
- DTRACE = dtrace
+ PROTOC ?= protoc
+ DTRACE ?= dtrace
CONFIG ?= opt
+ # Doing X ?= Y is the same as:
+ # ifeq ($(origin X), undefined)
+ # X = Y
+ # endif
+ # but some variables, such as CC, CXX, LD or AR, have defaults.
+ # So instead of using ?= on them, we need to check their origin.
+ # See:
+ # https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
+ # https://www.gnu.org/software/make/manual/html_node/Flavors.html#index-_003f_003d
+ # https://www.gnu.org/software/make/manual/html_node/Origin-Function.html
+ ifeq ($(origin CC), default)
CC = $(CC_$(CONFIG))
+ endif
+ ifeq ($(origin CXX), default)
CXX = $(CXX_$(CONFIG))
+ endif
+ ifeq ($(origin LD), default)
LD = $(LD_$(CONFIG))
- LDXX = $(LDXX_$(CONFIG))
+ endif
+ LDXX ?= $(LDXX_$(CONFIG))
+ ifeq ($(origin AR), default)
AR = ar
+ endif
ifeq ($(SYSTEM),Linux)
- STRIP = strip --strip-unneeded
+ STRIP ?= strip --strip-unneeded
else
ifeq ($(SYSTEM),Darwin)
- STRIP = strip -x
+ STRIP ?= strip -x
else
- STRIP = strip
+ STRIP ?= strip
endif
endif
- INSTALL = install
- RM = rm -f
- PKG_CONFIG = pkg-config
+ INSTALL ?= install
+ RM ?= rm -f
+ PKG_CONFIG ?= pkg-config
ifndef VALID_CONFIG_$(CONFIG)
$(error Invalid CONFIG value '$(CONFIG)')
@@ -176,10 +194,10 @@
# cross-compiling, you can override these variables from GNU make's
# command line: make CC=cross-gcc HOST_CC=gcc
- HOST_CC = $(CC)
- HOST_CXX = $(CXX)
- HOST_LD = $(LD)
- HOST_LDXX = $(LDXX)
+ HOST_CC ?= $(CC)
+ HOST_CXX ?= $(CXX)
+ HOST_LD ?= $(LD)
+ HOST_LDXX ?= $(LDXX)
ifdef EXTRA_DEFINES
DEFINES += $(EXTRA_DEFINES)
@@ -321,14 +339,6 @@
IS_GIT_FOLDER = true
endif
- ifeq ($(SYSTEM),Linux)
- OPENSSL_REQUIRES_DL = true
- endif
-
- ifeq ($(SYSTEM),Darwin)
- OPENSSL_REQUIRES_DL = true
- endif
-
ifeq ($(HAS_PKG_CONFIG),true)
OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl
OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl
@@ -347,11 +357,6 @@
ZLIB_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS)
PROTOBUF_CHECK_CMD = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS)
- ifeq ($(OPENSSL_REQUIRES_DL),true)
- OPENSSL_ALPN_CHECK_CMD += -ldl
- OPENSSL_NPN_CHECK_CMD += -ldl
- endif
-
endif # HAS_PKG_CONFIG
PERFTOOLS_CHECK_CMD = $(CC) $(CFLAGS) $(CPPFLAGS) -o $(TMPOUT) test/build/perftools.c -lprofiler $(LDFLAGS)
@@ -515,9 +520,6 @@
OPENSSL_MERGE_LIBS += $(LIBDIR)/$(CONFIG)/libboringssl.a
# need to prefix these to ensure overriding system libraries
CPPFLAGS := -Ithird_party/boringssl/include $(CPPFLAGS)
- ifeq ($(OPENSSL_REQUIRES_DL),true)
- LIBS_SECURE = dl
- endif # OPENSSL_REQUIRES_DL
else # EMBED_OPENSSL=false
ifeq ($(HAS_PKG_CONFIG),true)
OPENSSL_PKG_CONFIG = true
@@ -537,10 +539,7 @@
CPPFLAGS += -DTSI_OPENSSL_ALPN_SUPPORT=0
LIBS_SECURE = $(OPENSSL_LIBS)
endif # HAS_SYSTEM_OPENSSL_NPN
- ifeq ($(OPENSSL_REQUIRES_DL),true)
- LIBS_SECURE += dl
PC_LIBS_SECURE = $(addprefix -l, $(LIBS_SECURE))
- endif # OPENSSL_REQUIRES_DL=true
endif # EMBED_OPENSSL
endif # NO_SECURE
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template
index 8014ff3718..71276e75e5 100644
--- a/templates/binding.gyp.template
+++ b/templates/binding.gyp.template
@@ -7,7 +7,7 @@
# This file can be regenerated from the template by running
# tools/buildgen/generate_projects.sh
- # Copyright 2015, Google Inc.
+ # Copyright 2015-2016, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,12 +56,16 @@
],
'include_dirs': [
'.',
- 'include',
- '<(node_root_dir)/deps/openssl/openssl/include',
- '<(node_root_dir)/deps/zlib'
+ 'include'
],
'conditions': [
- ['OS != "win"', {
+ ['OS == "win"', {
+ "include_dirs": [ "third_party/boringssl/include" ]
+ }, {
+ 'include_dirs': [
+ '<(node_root_dir)/deps/openssl/openssl/include',
+ '<(node_root_dir)/deps/zlib'
+ ],
'conditions': [
['config=="gcov"', {
'cflags': [
@@ -74,24 +78,58 @@
'-fprofile-arcs'
]
}
- ]
+ ],
+ ["target_arch=='ia32'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
+ }],
+ ["target_arch=='x64'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
+ }],
+ ["target_arch=='arm'", {
+ "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
+ }]
]
- }],
- ["target_arch=='ia32'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/piii" ]
- }],
- ["target_arch=='x64'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/k8" ]
- }],
- ["target_arch=='arm'", {
- "include_dirs": [ "<(node_root_dir)/deps/openssl/config/arm" ]
}]
]
},
+ 'conditions': [
+ ['OS == "win"', {
+ 'targets': [
+ # Only want to compile BoringSSL and zlib under Windows
+ % for module in node_modules:
+ % for lib in libs:
+ % if lib.name in module.transitive_deps and lib.name in ('boringssl', 'z'):
+ {
+ 'cflags': [
+ '-std=c99',
+ '-Wall',
+ '-Werror'
+ ],
+ 'target_name': '${lib.name}',
+ 'product_prefix': 'lib',
+ 'type': 'static_library',
+ 'dependencies': [
+ % for dep in getattr(lib, 'deps', []):
+ '${dep}',
+ % endfor
+ ],
+ 'sources': [
+ % for source in lib.src:
+ '${source}',
+ % endfor
+ ],
+ "include_dirs": [ "third_party/boringssl/include" ]
+ },
+ % endif
+ % endfor
+ % endfor
+ ]
+ }]
+ ],
'targets': [
% for module in node_modules:
% for lib in libs:
- % if lib.name in module.transitive_deps:
+ % if lib.name in module.transitive_deps and lib.name not in ('boringssl', 'z'):
{
'cflags': [
'-std=c99',
@@ -117,7 +155,7 @@
'MACOSX_DEPLOYMENT_TARGET': '10.9'
}
}]
- ],
+ ]
},
% endif
% endfor
@@ -138,13 +176,22 @@
'-g'
],
"conditions": [
- ['OS == "mac"', {
+ ['OS=="mac"', {
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.9',
'OTHER_CFLAGS': [
'-stdlib=libc++'
]
}
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ % for dep in getattr(module, 'deps', []):
+ % if dep in ('boringssl', 'z'):
+ "${dep}",
+ % endif
+ % endfor
+ ]
}]
],
"target_name": "${module.name}",
@@ -155,10 +202,23 @@
],
"dependencies": [
% for dep in getattr(module, 'deps', []):
+ % if dep not in ('boringssl', 'z'):
"${dep}",
+ % endif
% endfor
]
},
% endfor
+ {
+ "target_name": "action_after_build",
+ "type": "none",
+ "dependencies": [ "<(module_name)" ],
+ "copies": [
+ {
+ "files": [ "<(PRODUCT_DIR)/<(module_name).node"],
+ "destination": "<(module_path)"
+ }
+ ]
+ }
]
}
diff --git a/templates/package.json.template b/templates/package.json.template
index ec6827ef76..ed4dca50e2 100644
--- a/templates/package.json.template
+++ b/templates/package.json.template
@@ -24,12 +24,14 @@
"lint": "node ./node_modules/jshint/bin/jshint src/node/src src/node/test src/node/interop src/node/index.js",
"test": "./node_modules/.bin/mocha src/node/test && npm run-script lint",
"gen_docs": "./node_modules/.bin/jsdoc -c src/node/jsdoc_conf.json",
- "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test"
+ "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test",
+ "preinstall": "npm install node-pre-gyp",
+ "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build"
},
"dependencies": {
- "bindings": "^1.2.0",
"lodash": "^3.9.3",
"nan": "^2.0.0",
+ "node-pre-gyp": "^0.6.19",
"protobufjs": "^4.0.0"
},
"devDependencies": {
@@ -47,6 +49,14 @@
"engines": {
"node": ">=0.10.13"
},
+ "binary": {
+ "module_name": "grpc_node",
+ "module_path": "./build/Release/",
+ "host": "https://storage.googleapis.com/",
+ "remote_path": "grpc-precompiled-binaries/node/{name}/v{version}",
+ "package_name": "{node_abi}-{platform}-{arch}.tar.gz",
+ "module_path": "src/node/extension_binary"
+ },
"files": [
"LICENSE",
"src/node/README.md",
diff --git a/test/cpp/qps/qps_driver.cc b/test/cpp/qps/qps_driver.cc
index 9816a09592..e3e7cb296b 100644
--- a/test/cpp/qps/qps_driver.cc
+++ b/test/cpp/qps/qps_driver.cc
@@ -153,7 +153,7 @@ static void QpsDriver() {
ServerConfig server_config;
server_config.set_server_type(server_type);
- server_config.set_host("localhost");
+ server_config.set_host("::"); // Use the wildcard server address
server_config.set_async_server_threads(FLAGS_async_server_threads);
if (FLAGS_secure_test) {
diff --git a/tools/buildgen/generate_projects.py b/tools/buildgen/generate_projects.py
index 083a97874d..965dd292af 100755
--- a/tools/buildgen/generate_projects.py
+++ b/tools/buildgen/generate_projects.py
@@ -47,6 +47,7 @@ os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '..', '..'))
argp = argparse.ArgumentParser()
argp.add_argument('json', nargs='+')
argp.add_argument('--templates', nargs='+', default=[])
+argp.add_argument('--jobs', '-j', default=multiprocessing.cpu_count(), type=int)
args = argp.parse_args()
json = args.json
@@ -87,7 +88,7 @@ for template in templates:
cmd.append(root + '/' + f)
jobs.append(jobset.JobSpec(cmd, shortname=out, timeout_seconds=None))
-jobset.run(jobs, maxjobs=multiprocessing.cpu_count())
+jobset.run(jobs, maxjobs=args.jobs)
if test is not None:
for s, g in test.iteritems():
diff --git a/tools/jenkins/grpc_interop_node/build_interop.sh b/tools/jenkins/grpc_interop_node/build_interop.sh
index 3b69715c9a..4d4290d0b4 100755
--- a/tools/jenkins/grpc_interop_node/build_interop.sh
+++ b/tools/jenkins/grpc_interop_node/build_interop.sh
@@ -45,4 +45,4 @@ make install-certs
# build Node interop client & server
npm install -g node-gyp
-(npm install && node-gyp rebuild)
+npm install --unsafe-perm --build-from-source
diff --git a/tools/run_tests/build_node.sh b/tools/run_tests/build_node.sh
index faa7b624b8..b856b97942 100755
--- a/tools/run_tests/build_node.sh
+++ b/tools/run_tests/build_node.sh
@@ -36,4 +36,4 @@ CONFIG=${CONFIG:-opt}
# change to grpc repo root
cd $(dirname $0)/../..
-npm install --unsafe-perm
+npm install --unsafe-perm --build-from-source
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index f8b01021c8..6ea274b31d 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -452,7 +452,7 @@ class Sanity(object):
def test_specs(self, config, args):
import yaml
with open('tools/run_tests/sanity_tests.yaml', 'r') as f:
- return [config.job_spec([cmd['script']], None, timeout_seconds=None, environ={'TEST': 'true'}, cpu_cost=cmd.get('cpu_cost', 1))
+ return [config.job_spec(cmd['script'].split(), None, timeout_seconds=None, environ={'TEST': 'true'}, cpu_cost=cmd.get('cpu_cost', 1))
for cmd in yaml.load(f)]
def pre_build_steps(self):
diff --git a/tools/run_tests/sanity_tests.yaml b/tools/run_tests/sanity_tests.yaml
index 160acde565..757bcd9d34 100644
--- a/tools/run_tests/sanity_tests.yaml
+++ b/tools/run_tests/sanity_tests.yaml
@@ -2,8 +2,8 @@
- script: tools/run_tests/check_sources_and_headers.py
- script: tools/run_tests/check_submodules.sh
- script: tools/run_tests/check_cache_mk.sh
-- script: tools/buildgen/generate_projects.sh
- cpu_cost: 100
+- script: tools/buildgen/generate_projects.sh -j 3
+ cpu_cost: 3
- script: tools/distrib/check_copyright.py
- script: tools/distrib/clang_format_code.sh
- script: tools/distrib/check_trailing_newlines.sh