diff options
author | Yuchen Zeng <zyc@google.com> | 2017-02-27 13:35:41 -0800 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2017-03-17 15:57:23 -0700 |
commit | 2c977084c8fec4bc395976338683d1d480bab91e (patch) | |
tree | cf696a8403371b308a45d02445864159ba527e08 /templates | |
parent | dc6b569d97aa54e987681f869f13acdd9c89834f (diff) | |
parent | dc720ca6bf27181c040cefcdb298d9dee8bf3058 (diff) |
Merge remote-tracking branch 'upstream/master' into cares_bazel_rule
Diffstat (limited to 'templates')
-rw-r--r-- | templates/Makefile.template | 4 | ||||
-rw-r--r-- | templates/binding.gyp.template | 28 | ||||
-rw-r--r-- | templates/gRPC-Core.podspec.template | 3 | ||||
-rw-r--r-- | templates/grpc.gemspec.template | 4 | ||||
-rw-r--r-- | templates/src/csharp/build_options.include | 8 | ||||
-rw-r--r-- | templates/tools/run_tests/generated/tests.json.template | 30 |
6 files changed, 44 insertions, 33 deletions
diff --git a/templates/Makefile.template b/templates/Makefile.template index 6b8f9fcac1..3ea69f8ca5 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1542,7 +1542,7 @@ out_mingbase = '$(LIBDIR)/$(CONFIG)/' + lib.name + '$(SHARED_VERSION_' + lang_to_var[lib.language] + ')' out_libbase = '$(LIBDIR)/$(CONFIG)/lib' + lib.name + '$(SHARED_VERSION_' + lang_to_var[lib.language] + ')' - common = '$(LIB' + lib.name.upper() + '_OBJS) $(LDLIBS)' + common = '$(LIB' + lib.name.upper() + '_OBJS)' link_libs = '' lib_deps = ' $(ZLIB_DEP) $(CARES_DEP)' @@ -1592,6 +1592,8 @@ ldflags = '$(LDFLAGS)' if lib.get('LDFLAGS', None): ldflags += ' ' + lib['LDFLAGS'] + + common = common + ' $(LDLIBS)' %> % if lib.build == "all": diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 7c534bf635..568cf75a33 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -40,7 +40,12 @@ # https://n8.io/converting-a-c-library-to-gyp/ { 'variables': { - 'runtime%': 'node' + 'runtime%': 'node', + # UV integration in C core is disabled by default while bugs are ironed + # 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' }, 'target_defaults': { 'include_dirs': [ @@ -51,10 +56,12 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE' ], 'conditions': [ - ['runtime=="node"', { + ['runtime=="node" and grpc_uv=="true"', { 'defines': [ - 'GRPC_UV', 'GRPC_ARES=0', + # Disabling this while bugs are ironed out. Uncomment this to + # re-enable libuv integration in C core. + 'GRPC_UV' ] }], ['OS!="win" and runtime=="electron"', { @@ -71,19 +78,10 @@ 'OPENSSL_NO_ASM' ] }, { - # Based on logic above, we know that this must be a non-Windows system - 'variables': { - # 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 target is "[major].[minor].[patch]". We split by - # periods and take the first field to get the major version. + # 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=<!(echo <(target) | cut -d. -f1)' + 'TSI_OPENSSL_ALPN_SUPPORT=1' ], 'include_dirs': [ '<(node_root_dir)/deps/openssl/openssl/include', diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index e2e08c5dcf..41673af8ba 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -162,7 +162,8 @@ s.subspec 'Cronet-Interface' do |ss| ss.header_mappings_dir = 'include/grpc' - ss.source_files = 'include/grpc/grpc_cronet.h' + ss.source_files = 'include/grpc/grpc_cronet.h', + 'src/core/ext/transport/cronet/transport/cronet_transport.h' end s.subspec 'Cronet-Implementation' do |ss| diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 82fbb69008..462ea52614 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -29,7 +29,7 @@ s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.1.0' + s.add_dependency 'google-protobuf', '~> 3.1' s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' @@ -37,7 +37,7 @@ s.add_development_dependency 'logging', '~> 2.0' s.add_development_dependency 'simplecov', '~> 0.9' s.add_development_dependency 'rake', '~> 10.4' - s.add_development_dependency 'rake-compiler', '~> 0.9' + s.add_development_dependency 'rake-compiler', '~> 1.0' s.add_development_dependency 'rake-compiler-dock', '~> 0.5.1' s.add_development_dependency 'rspec', '~> 3.2' s.add_development_dependency 'rubocop', '~> 0.30.0' diff --git a/templates/src/csharp/build_options.include b/templates/src/csharp/build_options.include index 9a32b7c6f4..db4cc19803 100644 --- a/templates/src/csharp/build_options.include +++ b/templates/src/csharp/build_options.include @@ -21,8 +21,8 @@ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key", "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem", % endif - "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "grpc_csharp_ext.x86.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "grpc_csharp_ext.x64.dll": "../../../cmake/build/x64/Debug/grpc_csharp_ext.dll", + "grpc_csharp_ext.x86.dll": "../../../cmake/build/Win32/Debug/grpc_csharp_ext.dll", "libgrpc_csharp_ext.x64.so": "../../../libs/dbg/libgrpc_csharp_ext.so", "libgrpc_csharp_ext.x64.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" } @@ -44,8 +44,8 @@ "data/server1.key": "../Grpc.IntegrationTesting/data/server1.key", "data/server1.pem": "../Grpc.IntegrationTesting/data/server1.pem", % endif - "grpc_csharp_ext.x64.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", - "grpc_csharp_ext.x86.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "grpc_csharp_ext.x64.dll": "../../../cmake/build/x64/Release/grpc_csharp_ext.dll", + "grpc_csharp_ext.x86.dll": "../../../cmake/build/Win32/Release/grpc_csharp_ext.dll", "libgrpc_csharp_ext.x64.so": "../../../libs/opt/libgrpc_csharp_ext.so", "libgrpc_csharp_ext.x64.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" } diff --git a/templates/tools/run_tests/generated/tests.json.template b/templates/tools/run_tests/generated/tests.json.template index 2815dbb9b3..10ab2e445a 100644 --- a/templates/tools/run_tests/generated/tests.json.template +++ b/templates/tools/run_tests/generated/tests.json.template @@ -2,18 +2,28 @@ --- | <%! import json + + def gen_one_target(tgt): + out = {"name": tgt.name, + "language": tgt.language, + "platforms": tgt.platforms, + "ci_platforms": tgt.ci_platforms, + "gtest": tgt.gtest, + "exclude_configs": tgt.get("exclude_configs", []), + "exclude_iomgrs": tgt.get("exclude_iomgrs", []), + "args": tgt.get("args", []), + "flaky": tgt.flaky, + "cpu_cost": tgt.get("cpu_cost", 1.0)} + timeout_seconds = tgt.get("timeout_seconds", None) + if timeout_seconds: + out['timeout_seconds'] = timeout_seconds + excluded_poll_engines = tgt.get("excluded_poll_engines", None) + if excluded_poll_engines: + out['excluded_poll_engines'] = excluded_poll_engines + return out %> - ${json.dumps([{"name": tgt.name, - "language": tgt.language, - "platforms": tgt.platforms, - "ci_platforms": tgt.ci_platforms, - "gtest": tgt.gtest, - "exclude_configs": tgt.get("exclude_configs", []), - "exclude_iomgrs": tgt.get("exclude_iomgrs", []), - "args": tgt.get("args", []), - "flaky": tgt.flaky, - "cpu_cost": tgt.get("cpu_cost", 1.0)} + ${json.dumps([gen_one_target(tgt) for tgt in targets if tgt.get('run', True) and tgt.build == 'test'] + tests, |