From d71ff05b513f6c80dc88210d0f75153851f0bc16 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 16 Feb 2016 16:12:48 -0800 Subject: Added codegen_lib target --- BUILD | 52 ++++++ Makefile | 110 +++++++++++- build.yaml | 7 + tools/run_tests/sources_and_headers.json | 82 +++++++++ vsprojects/grpc.sln | 21 +++ vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj | 200 +++++++++++++++++++++ .../codegen_lib/codegen_lib.vcxproj.filters | 155 ++++++++++++++++ 7 files changed, 625 insertions(+), 2 deletions(-) create mode 100644 vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj create mode 100644 vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters diff --git a/BUILD b/BUILD index 495af2a49c..25d8ab5a8d 100644 --- a/BUILD +++ b/BUILD @@ -770,6 +770,58 @@ cc_library( ) +cc_library( + name = "codegen_lib", + srcs = [ + "src/cpp/codegen/grpc_library.cc", + ], + hdrs = [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + ], +) + + cc_library( name = "grpc++", srcs = [ diff --git a/Makefile b/Makefile index cce7118829..bd1161f7a6 100644 --- a/Makefile +++ b/Makefile @@ -1076,13 +1076,13 @@ static: static_c static_cxx static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_zookeeper_libs -static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a +static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a shared: shared_c shared_cxx shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_zookeeper_libs -shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) +shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) ifeq ($(HAS_ZOOKEEPER),true) @@ -1683,6 +1683,8 @@ endif strip-static_cxx: static_cxx ifeq ($(CONFIG),opt) + $(E) "[STRIP] Stripping libcodegen_lib.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(E) "[STRIP] Stripping libgrpc++.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(E) "[STRIP] Stripping libgrpc++_unsecure.a" @@ -1705,6 +1707,8 @@ endif strip-shared_cxx: shared_cxx ifeq ($(CONFIG),opt) + $(E) "[STRIP] Stripping $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" @@ -2000,6 +2004,9 @@ ifeq ($(HAS_ZOOKEEPER),true) endif install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx + $(E) "[INSTALL] Installing libcodegen_lib.a" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(prefix)/lib/libcodegen_lib.a $(E) "[INSTALL] Installing libgrpc++.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a @@ -2056,6 +2063,15 @@ endif install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-config_cxx + $(E) "[INSTALL] Installing $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) +ifeq ($(SYSTEM),MINGW32) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libcodegen_lib-imp.a $(prefix)/lib/libcodegen_lib-imp.a +else ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libcodegen_lib.so.0 + $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libcodegen_lib.so +endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) @@ -2928,6 +2944,96 @@ endif endif +LIBCODEGEN_LIB_SRC = \ + src/cpp/codegen/grpc_library.cc \ + +PUBLIC_HEADERS_CXX += \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ + +LIBCODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBCODEGEN_LIB_SRC)))) + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libcodegen_lib.a: protobuf_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error + +else + +$(LIBDIR)/$(CONFIG)/libcodegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBCODEGEN_LIB_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libcodegen_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(LIBCODEGEN_LIB_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libcodegen_lib.a +endif + + + +ifeq ($(SYSTEM),MINGW32) +$(LIBDIR)/$(CONFIG)/codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBCODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBCODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) +else +$(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBCODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` +ifeq ($(SYSTEM),Darwin) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBCODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) +else + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libcodegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBCODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).so +endif +endif + +endif + +ifneq ($(NO_DEPS),true) +-include $(LIBCODEGEN_LIB_OBJS:.o=.dep) +endif + + LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ diff --git a/build.yaml b/build.yaml index dc7fce3213..f6b54eb28d 100644 --- a/build.yaml +++ b/build.yaml @@ -674,6 +674,13 @@ libs: - grpc - gpr_test_util - gpr +- name: codegen_lib + build: all + language: c++ + filegroups: + - grpc++_codegen + - grpc_codegen + secure: false - name: grpc++ build: all language: c++ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index a5ff6b51b8..52c41d5e20 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3945,6 +3945,88 @@ "test/core/util/test_tcp_server.h" ] }, + { + "deps": [], + "headers": [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h" + ], + "language": "c++", + "name": "codegen_lib", + "src": [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + "src/cpp/codegen/grpc_library.cc" + ] + }, { "deps": [ "grpc" diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index ad9198341a..4f13f7600e 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -75,6 +75,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_tcp_server", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "codegen_lib", "vcxproj\.\codegen_lib\codegen_lib.vcxproj", "{B39FD502-C1A9-FB66-4240-7FD06B073546}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\grpc++.vcxproj", "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" ProjectSection(myProperties) = preProject lib = "True" @@ -300,6 +305,22 @@ Global {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|Win32.Build.0 = Release|Win32 {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.ActiveCfg = Release|x64 {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.Build.0 = Release|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|Win32.ActiveCfg = Debug|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|x64.ActiveCfg = Debug|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|Win32.ActiveCfg = Release|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|x64.ActiveCfg = Release|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|Win32.Build.0 = Debug|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|x64.Build.0 = Debug|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|Win32.Build.0 = Release|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|x64.Build.0 = Release|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|x64.Build.0 = Debug|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|Win32.Build.0 = Release|Win32 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|x64.ActiveCfg = Release|x64 + {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|x64.Build.0 = Release|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|Win32.ActiveCfg = Debug|Win32 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|x64.ActiveCfg = Debug|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj new file mode 100644 index 0000000000..21b8dfb36c --- /dev/null +++ b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj @@ -0,0 +1,200 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B39FD502-C1A9-FB66-4240-7FD06B073546} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + codegen_lib + + + codegen_lib + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters new file mode 100644 index 0000000000..24eed23edf --- /dev/null +++ b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters @@ -0,0 +1,155 @@ + + + + + src\cpp\codegen + + + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + + + + {26708a09-f550-4ca3-5b87-0c59b8d2a990} + + + {04860d30-add0-446c-0616-9a868fc666db} + + + {b6dbcd21-b90a-418f-c573-1506c332b8e8} + + + {a956ffb7-4d13-0bdb-59a3-b4c8aa3f474e} + + + {875841b7-cb83-f37e-f577-fd760171b82a} + + + {3498847d-d81a-00e2-5cac-4848d1a0fc1d} + + + {9bcd27c0-64e4-9efd-2410-c61ff61ceba4} + + + {16750fe6-ad5d-a9e8-3b9a-aa950b684a1d} + + + {4c1ab54d-a99c-092e-0fa1-21567544a045} + + + {e68d006c-11d5-e865-91fe-bca4384da93a} + + + {626b856b-6ded-b6a2-feb8-2469a1c3e29c} + + + + -- cgit v1.2.3 From 4feb3502c216f4db398d888b83e5c67025f65b57 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 16 Feb 2016 17:18:31 -0800 Subject: Fixed header dependencies and copyrights --- BUILD | 56 ++++++++++ build.yaml | 15 +++ test/core/iomgr/udp_server_test.c | 2 +- tools/doxygen/Doxyfile.c++.internal | 14 +++ tools/run_tests/sources_and_headers.json | 114 ++++++++++++++++++++- vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj | 16 +++ .../codegen_lib/codegen_lib.vcxproj.filters | 44 ++++++++ vsprojects/vcxproj/grpc++/grpc++.vcxproj | 14 +++ vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 51 +++++++++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 14 +++ .../grpc++_unsecure.vcxproj.filters | 51 +++++++++ .../grpc_plugin_support.vcxproj | 14 +++ .../grpc_plugin_support.vcxproj.filters | 42 ++++++++ 13 files changed, 445 insertions(+), 2 deletions(-) diff --git a/BUILD b/BUILD index 25d8ab5a8d..2d0493afde 100644 --- a/BUILD +++ b/BUILD @@ -773,6 +773,20 @@ cc_library( cc_library( name = "codegen_lib", srcs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/codegen/grpc_library.cc", ], hdrs = [ @@ -832,6 +846,20 @@ cc_library( "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/client/secure_credentials.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/secure_auth_context.cc", @@ -961,6 +989,20 @@ cc_library( "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", @@ -1096,6 +1138,20 @@ cc_library( "src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_map-inl.h", "src/compiler/ruby_generator_string-inl.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/compiler/cpp_generator.cc", "src/compiler/csharp_generator.cc", "src/compiler/objective_c_generator.cc", diff --git a/build.yaml b/build.yaml index f6b54eb28d..fa5f316b61 100644 --- a/build.yaml +++ b/build.yaml @@ -234,6 +234,21 @@ filegroups: - include/grpc++/impl/codegen/sync_no_cxx11.h - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h + headers: + - include/grpc/impl/codegen/alloc.h + - include/grpc/impl/codegen/atm.h + - include/grpc/impl/codegen/atm_gcc_atomic.h + - include/grpc/impl/codegen/atm_gcc_sync.h + - include/grpc/impl/codegen/atm_win32.h + - include/grpc/impl/codegen/log.h + - include/grpc/impl/codegen/port_platform.h + - include/grpc/impl/codegen/slice.h + - include/grpc/impl/codegen/slice_buffer.h + - include/grpc/impl/codegen/sync.h + - include/grpc/impl/codegen/sync_generic.h + - include/grpc/impl/codegen/sync_posix.h + - include/grpc/impl/codegen/sync_win32.h + - include/grpc/impl/codegen/time.h src: - src/cpp/codegen/grpc_library.cc - name: grpc_base diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 0bb69a2a76..2e253d8a8a 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -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 diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index d5e5df86f6..13dba2e64d 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -841,6 +841,20 @@ src/cpp/client/create_channel_internal.h \ src/cpp/common/create_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ +include/grpc/impl/codegen/alloc.h \ +include/grpc/impl/codegen/atm.h \ +include/grpc/impl/codegen/atm_gcc_atomic.h \ +include/grpc/impl/codegen/atm_gcc_sync.h \ +include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/log.h \ +include/grpc/impl/codegen/port_platform.h \ +include/grpc/impl/codegen/slice.h \ +include/grpc/impl/codegen/slice_buffer.h \ +include/grpc/impl/codegen/sync.h \ +include/grpc/impl/codegen/sync_generic.h \ +include/grpc/impl/codegen/sync_posix.h \ +include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/time.h \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 52c41d5e20..16b2742ff3 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3978,12 +3978,26 @@ "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h" + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" ], "language": "c++", "name": "codegen_lib", @@ -4018,12 +4032,26 @@ "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/codegen/grpc_library.cc" ] }, @@ -4106,6 +4134,20 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/client/secure_credentials.h", "src/cpp/common/create_auth_context.h", @@ -4191,6 +4233,20 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -4361,6 +4417,20 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", @@ -4443,6 +4513,20 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -4513,25 +4597,39 @@ "include/grpc++/support/config.h", "include/grpc++/support/config_protobuf.h", "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", "include/grpc/impl/codegen/slice_buffer.h", "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", + "include/grpc/impl/codegen/time.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", "src/compiler/cpp_generator_helpers.h", @@ -4582,25 +4680,39 @@ "include/grpc++/support/config.h", "include/grpc++/support/config_protobuf.h", "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", "include/grpc/impl/codegen/slice_buffer.h", "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", + "include/grpc/impl/codegen/time.h", "src/compiler/config.h", "src/compiler/cpp_generator.cc", "src/compiler/cpp_generator.h", diff --git a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj index 21b8dfb36c..e4becdc8cb 100644 --- a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj +++ b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj @@ -184,6 +184,22 @@ + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters index 24eed23edf..d82cf0b409 100644 --- a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters @@ -115,6 +115,50 @@ include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index c62faf33e6..89057fea8a 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -341,6 +341,20 @@ + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 5f9350e76a..0dfb24ee94 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -347,12 +347,57 @@ src\cpp\server + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + {82445414-24cd-8198-1fe1-4267c3f3df00} + + {16946104-53ac-ac76-68b9-f9ec77ea6fae} + {784a0281-f547-aeb0-9f55-b26b7de9c769} @@ -374,6 +419,12 @@ {a5c10dae-f715-2a30-1066-d22f8bc94cb2} + + {48c3b0ae-c00f-fa20-6965-b73da65d71cb} + + + {dc8bfccd-341f-26f0-8ee4-47dde62a6dd1} + {328ff211-2886-406e-56f9-18ba1686f363} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index fb4246580f..07b122d2c4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -338,6 +338,20 @@ + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index eeff7d3697..028773d85c 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -323,12 +323,57 @@ src\cpp\server + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + {5c4eb19f-d511-e8fd-e1d6-c377cdc7d3b1} + + {f3dd91a8-058b-becf-9e41-eb42c7bc6e55} + {eceb50c0-bb49-3812-b6bd-b0af6df81da7} @@ -350,6 +395,12 @@ {0ebf8008-80b9-d6da-e1dc-854bf1ec2195} + + {c1049250-64f6-f900-d2e5-1718e148f1f0} + + + {adf6b8e3-4a4b-cb35-bb3d-568af97b58d1} + {cce6a85d-1111-3834-6825-31e170d93cff} diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj index 89183902d7..0b07b8be60 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -214,6 +214,20 @@ + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters index de33d98f6d..7d70c573cc 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters @@ -218,6 +218,48 @@ src\compiler + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + -- cgit v1.2.3 From a8bb0bfc3eb9eef0dc5747cdfe74f21bb3fd087b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 18 Feb 2016 15:09:02 -0800 Subject: Split codegen target and made it libs --- BUILD | 259 ++----- Makefile | 424 +++++------ binding.gyp | 22 + build.yaml | 145 ++-- gRPC.podspec | 6 - grpc.gemspec | 6 - package.json | 836 ++++++++++----------- test/core/surface/public_headers_must_be_c89.c | 6 - tools/doxygen/Doxyfile.c++ | 32 +- tools/doxygen/Doxyfile.c++.internal | 47 +- tools/doxygen/Doxyfile.core | 6 - tools/doxygen/Doxyfile.core.internal | 6 - tools/run_tests/sources_and_headers.json | 607 ++++----------- vsprojects/buildtests_c.sln | 2 + vsprojects/grpc.sln | 67 +- vsprojects/grpc_csharp_ext.sln | 2 + vsprojects/grpc_protoc_plugins.sln | 4 + vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj | 216 ------ .../codegen_lib/codegen_lib.vcxproj.filters | 199 ----- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 49 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 153 ---- .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 210 ++++++ .../grpc++_codegen_lib.vcxproj.filters | 181 +++++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 49 +- .../grpc++_unsecure.vcxproj.filters | 153 ---- vsprojects/vcxproj/grpc/grpc.vcxproj | 9 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 24 - .../grpc_codegen_lib/grpc_codegen_lib.vcxproj | 166 ++++ .../grpc_codegen_lib.vcxproj.filters | 39 + .../grpc_plugin_support.vcxproj | 60 +- .../grpc_plugin_support.vcxproj.filters | 168 ----- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 9 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 24 - 33 files changed, 1598 insertions(+), 2588 deletions(-) delete mode 100644 vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj delete mode 100644 vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters create mode 100644 vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj create mode 100644 vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters create mode 100644 vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj create mode 100644 vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters diff --git a/BUILD b/BUILD index 2d0493afde..cfef6c1950 100644 --- a/BUILD +++ b/BUILD @@ -441,12 +441,6 @@ cc_library( ], hdrs = [ "include/grpc/grpc_security.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", @@ -462,6 +456,7 @@ cc_library( "//external:libssl", "//external:zlib", ":gpr", + ":grpc_codegen_lib", ], copts = [ "-std=gnu99", @@ -729,12 +724,6 @@ cc_library( "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/census.h", ], includes = [ @@ -743,6 +732,7 @@ cc_library( ], deps = [ ":gpr", + ":grpc_codegen_lib", ], copts = [ "-std=gnu99", @@ -770,72 +760,6 @@ cc_library( ) -cc_library( - name = "codegen_lib", - srcs = [ - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "src/cpp/codegen/grpc_library.cc", - ], - hdrs = [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ], -) - - cc_library( name = "grpc++", srcs = [ @@ -846,20 +770,6 @@ cc_library( "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/cpp/client/secure_credentials.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/secure_auth_context.cc", @@ -892,7 +802,6 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ "include/grpc++/alarm.h", @@ -939,6 +848,40 @@ cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + "//external:libssl", + "//external:protobuf_clib", + ":grpc", + ":grpc++_codegen_lib", + ], +) + + +cc_library( + name = "grpc++_codegen_lib", + srcs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "src/cpp/codegen/grpc_library.cc", + ], + hdrs = [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", "include/grpc++/impl/codegen/call.h", @@ -975,9 +918,6 @@ cc_library( ".", ], deps = [ - "//external:libssl", - "//external:protobuf_clib", - ":grpc", ], ) @@ -989,20 +929,6 @@ cc_library( "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", @@ -1030,7 +956,6 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ "include/grpc++/alarm.h", @@ -1077,36 +1002,6 @@ cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", ], includes = [ "include", @@ -1116,6 +1011,28 @@ cc_library( "//external:protobuf_clib", ":gpr", ":grpc_unsecure", + ":grpc++_codegen_lib", + ], +) + + +cc_library( + name = "grpc_codegen_lib", + srcs = [ + ], + hdrs = [ + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + ], + includes = [ + "include", + ".", + ], + deps = [ ], ) @@ -1138,64 +1055,13 @@ cc_library( "src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_map-inl.h", "src/compiler/ruby_generator_string-inl.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/compiler/cpp_generator.cc", "src/compiler/csharp_generator.cc", "src/compiler/objective_c_generator.cc", "src/compiler/python_generator.cc", "src/compiler/ruby_generator.cc", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/alloc.h", "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", @@ -1217,6 +1083,8 @@ cc_library( ], deps = [ "//external:protobuf_compiler", + ":grpc_codegen_lib", + ":grpc++_codegen_lib", ], ) @@ -1510,12 +1378,6 @@ objc_library( ], hdrs = [ "include/grpc/grpc_security.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/byte_buffer.h", "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", @@ -1659,6 +1521,7 @@ objc_library( ], deps = [ ":gpr_objc", + ":grpc_codegen_lib_objc", "//external:libssl_objc", ], sdk_dylibs = ["libz"], diff --git a/Makefile b/Makefile index bd1161f7a6..1a80d740a5 100644 --- a/Makefile +++ b/Makefile @@ -1076,13 +1076,13 @@ static: static_c static_cxx static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_zookeeper_libs -static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a +static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a shared: shared_c shared_cxx shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_zookeeper_libs -shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) +shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) ifeq ($(HAS_ZOOKEEPER),true) @@ -1683,12 +1683,14 @@ endif strip-static_cxx: static_cxx ifeq ($(CONFIG),opt) - $(E) "[STRIP] Stripping libcodegen_lib.a" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(E) "[STRIP] Stripping libgrpc++.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(E) "[STRIP] Stripping libgrpc++_codegen_lib.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(E) "[STRIP] Stripping libgrpc++_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a + $(E) "[STRIP] Stripping libgrpc_codegen_lib.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a endif strip-shared_c: shared_c @@ -1707,12 +1709,14 @@ endif strip-shared_cxx: shared_cxx ifeq ($(CONFIG),opt) - $(E) "[STRIP] Stripping $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) + $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) + $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) endif strip-shared_csharp: shared_csharp @@ -2004,15 +2008,18 @@ ifeq ($(HAS_ZOOKEEPER),true) endif install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx - $(E) "[INSTALL] Installing libcodegen_lib.a" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(prefix)/lib/libcodegen_lib.a $(E) "[INSTALL] Installing libgrpc++.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a + $(E) "[INSTALL] Installing libgrpc++_codegen_lib.a" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(prefix)/lib/libgrpc++_codegen_lib.a $(E) "[INSTALL] Installing libgrpc++_unsecure.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(prefix)/lib/libgrpc++_unsecure.a + $(E) "[INSTALL] Installing libgrpc_codegen_lib.a" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(prefix)/lib/libgrpc_codegen_lib.a @@ -2063,15 +2070,6 @@ endif install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-config_cxx - $(E) "[INSTALL] Installing $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -ifeq ($(SYSTEM),MINGW32) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libcodegen_lib-imp.a $(prefix)/lib/libcodegen_lib-imp.a -else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libcodegen_lib.so.0 - $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libcodegen_lib.so -endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) @@ -2080,6 +2078,15 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so +endif + $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) +ifeq ($(SYSTEM),MINGW32) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib-imp.a $(prefix)/lib/libgrpc++_codegen_lib-imp.a +else ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_codegen_lib.so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_codegen_lib.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib @@ -2089,6 +2096,15 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so +endif + $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) +ifeq ($(SYSTEM),MINGW32) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib-imp.a $(prefix)/lib/libgrpc_codegen_lib-imp.a +else ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_codegen_lib.so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_codegen_lib.so endif ifeq ($(HAS_ZOOKEEPER),true) endif @@ -2491,12 +2507,6 @@ LIBGRPC_SRC = \ PUBLIC_HEADERS_C += \ include/grpc/grpc_security.h \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/status.h \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ @@ -2530,18 +2540,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so endif @@ -2780,12 +2790,6 @@ PUBLIC_HEADERS_C += \ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/status.h \ include/grpc/census.h \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) @@ -2803,18 +2807,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a +$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so endif @@ -2944,96 +2948,6 @@ endif endif -LIBCODEGEN_LIB_SRC = \ - src/cpp/codegen/grpc_library.cc \ - -PUBLIC_HEADERS_CXX += \ - include/grpc++/impl/codegen/async_stream.h \ - include/grpc++/impl/codegen/async_unary_call.h \ - include/grpc++/impl/codegen/call.h \ - include/grpc++/impl/codegen/call_hook.h \ - include/grpc++/impl/codegen/channel_interface.h \ - include/grpc++/impl/codegen/client_context.h \ - include/grpc++/impl/codegen/client_unary_call.h \ - include/grpc++/impl/codegen/completion_queue.h \ - include/grpc++/impl/codegen/completion_queue_tag.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/impl/codegen/grpc_library.h \ - include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ - include/grpc++/impl/codegen/rpc_method.h \ - include/grpc++/impl/codegen/rpc_service_method.h \ - include/grpc++/impl/codegen/security/auth_context.h \ - include/grpc++/impl/codegen/serialization_traits.h \ - include/grpc++/impl/codegen/server_context.h \ - include/grpc++/impl/codegen/server_interface.h \ - include/grpc++/impl/codegen/service_type.h \ - include/grpc++/impl/codegen/status.h \ - include/grpc++/impl/codegen/status_code_enum.h \ - include/grpc++/impl/codegen/string_ref.h \ - include/grpc++/impl/codegen/stub_options.h \ - include/grpc++/impl/codegen/sync.h \ - include/grpc++/impl/codegen/sync_cxx11.h \ - include/grpc++/impl/codegen/sync_no_cxx11.h \ - include/grpc++/impl/codegen/sync_stream.h \ - include/grpc++/impl/codegen/time.h \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/status.h \ - -LIBCODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBCODEGEN_LIB_SRC)))) - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. - -$(LIBDIR)/$(CONFIG)/libcodegen_lib.a: protobuf_dep_error - -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error - -else - -$(LIBDIR)/$(CONFIG)/libcodegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBCODEGEN_LIB_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libcodegen_lib.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libcodegen_lib.a $(LIBCODEGEN_LIB_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib $(LIBDIR)/$(CONFIG)/libcodegen_lib.a -endif - - - -ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBCODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBCODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -else -$(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBCODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` -ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBCODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libcodegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBCODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) - $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).so.0 - $(Q) ln -sf $(SHARED_PREFIX)codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libcodegen_lib$(SHARED_VERSION).so -endif -endif - -endif - -ifneq ($(NO_DEPS),true) --include $(LIBCODEGEN_LIB_OBJS:.o=.dep) -endif - - LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ @@ -3067,7 +2981,6 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ - src/cpp/codegen/grpc_library.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -3114,6 +3027,74 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + +LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) + + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL. + +$(LIBDIR)/$(CONFIG)/libgrpc++.a: openssl_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error + +else + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libgrpc++.a: protobuf_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error + +else + +$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc++.a +endif + + + +ifeq ($(SYSTEM),MINGW32) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib.$(SHARED_EXT) $(OPENSSL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp -lgrpc++_codegen_lib-imp +else +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.$(SHARED_EXT) $(OPENSSL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` +ifeq ($(SYSTEM),Darwin) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgrpc++_codegen_lib +else + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgrpc++_codegen_lib + $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so +endif +endif + +endif + +endif + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC++_OBJS:.o=.dep) +endif +endif + + +LIBGRPC++_CODEGEN_LIB_SRC = \ + src/cpp/codegen/grpc_library.cc \ + +PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ @@ -3145,66 +3126,52 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ -LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) - - -ifeq ($(NO_SECURE),true) - -# You can't build secure libraries if you don't have OpenSSL. - -$(LIBDIR)/$(CONFIG)/libgrpc++.a: openssl_dep_error - -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): openssl_dep_error +LIBGRPC++_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_CODEGEN_LIB_SRC)))) -else ifeq ($(NO_PROTOBUF),true) # You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. -$(LIBDIR)/$(CONFIG)/libgrpc++.a: protobuf_dep_error +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: protobuf_dep_error -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBGRPC++_CODEGEN_LIB_OBJS) ifeq ($(SYSTEM),Darwin) - $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc - $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 - $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so endif endif endif -endif - -ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(LIBGRPC++_OBJS:.o=.dep) -endif +-include $(LIBGRPC++_CODEGEN_LIB_OBJS:.o=.dep) endif @@ -3346,7 +3313,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ - src/cpp/codegen/grpc_library.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -3393,36 +3359,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ - include/grpc++/impl/codegen/async_stream.h \ - include/grpc++/impl/codegen/async_unary_call.h \ - include/grpc++/impl/codegen/call.h \ - include/grpc++/impl/codegen/call_hook.h \ - include/grpc++/impl/codegen/channel_interface.h \ - include/grpc++/impl/codegen/client_context.h \ - include/grpc++/impl/codegen/client_unary_call.h \ - include/grpc++/impl/codegen/completion_queue.h \ - include/grpc++/impl/codegen/completion_queue_tag.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/impl/codegen/grpc_library.h \ - include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ - include/grpc++/impl/codegen/rpc_method.h \ - include/grpc++/impl/codegen/rpc_service_method.h \ - include/grpc++/impl/codegen/security/auth_context.h \ - include/grpc++/impl/codegen/serialization_traits.h \ - include/grpc++/impl/codegen/server_context.h \ - include/grpc++/impl/codegen/server_interface.h \ - include/grpc++/impl/codegen/service_type.h \ - include/grpc++/impl/codegen/status.h \ - include/grpc++/impl/codegen/status_code_enum.h \ - include/grpc++/impl/codegen/string_ref.h \ - include/grpc++/impl/codegen/stub_options.h \ - include/grpc++/impl/codegen/sync.h \ - include/grpc++/impl/codegen/sync_cxx11.h \ - include/grpc++/impl/codegen/sync_no_cxx11.h \ - include/grpc++/impl/codegen/sync_stream.h \ - include/grpc++/impl/codegen/time.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -3449,18 +3385,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp -lgrpc++_codegen_lib-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc++_codegen_lib else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc++_codegen_lib $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so endif @@ -3473,51 +3409,73 @@ ifneq ($(NO_DEPS),true) endif -LIBGRPC_PLUGIN_SUPPORT_SRC = \ - src/compiler/cpp_generator.cc \ - src/compiler/csharp_generator.cc \ - src/compiler/objective_c_generator.cc \ - src/compiler/python_generator.cc \ - src/compiler/ruby_generator.cc \ - src/cpp/codegen/grpc_library.cc \ +LIBGRPC_CODEGEN_LIB_SRC = \ PUBLIC_HEADERS_CXX += \ - include/grpc++/impl/codegen/async_stream.h \ - include/grpc++/impl/codegen/async_unary_call.h \ - include/grpc++/impl/codegen/call.h \ - include/grpc++/impl/codegen/call_hook.h \ - include/grpc++/impl/codegen/channel_interface.h \ - include/grpc++/impl/codegen/client_context.h \ - include/grpc++/impl/codegen/client_unary_call.h \ - include/grpc++/impl/codegen/completion_queue.h \ - include/grpc++/impl/codegen/completion_queue_tag.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/impl/codegen/grpc_library.h \ - include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ - include/grpc++/impl/codegen/rpc_method.h \ - include/grpc++/impl/codegen/rpc_service_method.h \ - include/grpc++/impl/codegen/security/auth_context.h \ - include/grpc++/impl/codegen/serialization_traits.h \ - include/grpc++/impl/codegen/server_context.h \ - include/grpc++/impl/codegen/server_interface.h \ - include/grpc++/impl/codegen/service_type.h \ - include/grpc++/impl/codegen/status.h \ - include/grpc++/impl/codegen/status_code_enum.h \ - include/grpc++/impl/codegen/string_ref.h \ - include/grpc++/impl/codegen/stub_options.h \ - include/grpc++/impl/codegen/sync.h \ - include/grpc++/impl/codegen/sync_cxx11.h \ - include/grpc++/impl/codegen/sync_no_cxx11.h \ - include/grpc++/impl/codegen/sync_stream.h \ - include/grpc++/impl/codegen/time.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ + +LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC)))) + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: protobuf_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error + +else + +$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC_CODEGEN_LIB_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBGRPC_CODEGEN_LIB_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a +endif + + + +ifeq ($(SYSTEM),MINGW32) +$(LIBDIR)/$(CONFIG)/grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) +else +$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` +ifeq ($(SYSTEM),Darwin) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) +else + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).so +endif +endif + +endif + +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC_CODEGEN_LIB_OBJS:.o=.dep) +endif + + +LIBGRPC_PLUGIN_SUPPORT_SRC = \ + src/compiler/cpp_generator.cc \ + src/compiler/csharp_generator.cc \ + src/compiler/objective_c_generator.cc \ + src/compiler/python_generator.cc \ + src/compiler/ruby_generator.cc \ + +PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ diff --git a/binding.gyp b/binding.gyp index 6d7f75ece4..a8de84b445 100644 --- a/binding.gyp +++ b/binding.gyp @@ -555,6 +555,7 @@ 'type': 'static_library', 'dependencies': [ 'gpr', + 'grpc_codegen_lib', ], 'sources': [ 'src/core/httpcli/httpcli_security_connector.c', @@ -720,6 +721,27 @@ }] ] }, + { + 'cflags': [ + '-std=c99', + '-Wall', + '-Werror' + ], + 'target_name': 'grpc_codegen_lib', + 'product_prefix': 'lib', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + ], + "conditions": [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] + }, { 'include_dirs': [ " #include #include -#include -#include -#include -#include #include #include -#include #include #include -#include #include #include #include diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index dd5c8ece26..edd4ebff92 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -803,37 +803,7 @@ include/grpc++/support/status_code_enum.h \ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ -include/grpc++/support/time.h \ -include/grpc++/impl/codegen/async_stream.h \ -include/grpc++/impl/codegen/async_unary_call.h \ -include/grpc++/impl/codegen/call.h \ -include/grpc++/impl/codegen/call_hook.h \ -include/grpc++/impl/codegen/channel_interface.h \ -include/grpc++/impl/codegen/client_context.h \ -include/grpc++/impl/codegen/client_unary_call.h \ -include/grpc++/impl/codegen/completion_queue.h \ -include/grpc++/impl/codegen/completion_queue_tag.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/impl/codegen/grpc_library.h \ -include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/proto_utils.h \ -include/grpc++/impl/codegen/rpc_method.h \ -include/grpc++/impl/codegen/rpc_service_method.h \ -include/grpc++/impl/codegen/security/auth_context.h \ -include/grpc++/impl/codegen/serialization_traits.h \ -include/grpc++/impl/codegen/server_context.h \ -include/grpc++/impl/codegen/server_interface.h \ -include/grpc++/impl/codegen/service_type.h \ -include/grpc++/impl/codegen/status.h \ -include/grpc++/impl/codegen/status_code_enum.h \ -include/grpc++/impl/codegen/string_ref.h \ -include/grpc++/impl/codegen/stub_options.h \ -include/grpc++/impl/codegen/sync.h \ -include/grpc++/impl/codegen/sync_cxx11.h \ -include/grpc++/impl/codegen/sync_no_cxx11.h \ -include/grpc++/impl/codegen/sync_stream.h \ -include/grpc++/impl/codegen/time.h +include/grpc++/support/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 13dba2e64d..50ed2f6d34 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -804,36 +804,6 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ -include/grpc++/impl/codegen/async_stream.h \ -include/grpc++/impl/codegen/async_unary_call.h \ -include/grpc++/impl/codegen/call.h \ -include/grpc++/impl/codegen/call_hook.h \ -include/grpc++/impl/codegen/channel_interface.h \ -include/grpc++/impl/codegen/client_context.h \ -include/grpc++/impl/codegen/client_unary_call.h \ -include/grpc++/impl/codegen/completion_queue.h \ -include/grpc++/impl/codegen/completion_queue_tag.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/impl/codegen/grpc_library.h \ -include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/proto_utils.h \ -include/grpc++/impl/codegen/rpc_method.h \ -include/grpc++/impl/codegen/rpc_service_method.h \ -include/grpc++/impl/codegen/security/auth_context.h \ -include/grpc++/impl/codegen/serialization_traits.h \ -include/grpc++/impl/codegen/server_context.h \ -include/grpc++/impl/codegen/server_interface.h \ -include/grpc++/impl/codegen/service_type.h \ -include/grpc++/impl/codegen/status.h \ -include/grpc++/impl/codegen/status_code_enum.h \ -include/grpc++/impl/codegen/string_ref.h \ -include/grpc++/impl/codegen/stub_options.h \ -include/grpc++/impl/codegen/sync.h \ -include/grpc++/impl/codegen/sync_cxx11.h \ -include/grpc++/impl/codegen/sync_no_cxx11.h \ -include/grpc++/impl/codegen/sync_stream.h \ -include/grpc++/impl/codegen/time.h \ src/cpp/client/secure_credentials.h \ src/cpp/common/secure_auth_context.h \ src/cpp/server/secure_server_credentials.h \ @@ -841,20 +811,6 @@ src/cpp/client/create_channel_internal.h \ src/cpp/common/create_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ -include/grpc/impl/codegen/alloc.h \ -include/grpc/impl/codegen/atm.h \ -include/grpc/impl/codegen/atm_gcc_atomic.h \ -include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ -include/grpc/impl/codegen/log.h \ -include/grpc/impl/codegen/port_platform.h \ -include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice_buffer.h \ -include/grpc/impl/codegen/sync.h \ -include/grpc/impl/codegen/sync_generic.h \ -include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ -include/grpc/impl/codegen/time.h \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ @@ -886,8 +842,7 @@ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ -src/cpp/util/time.cc \ -src/cpp/codegen/grpc_library.cc +src/cpp/util/time.cc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index a9b14c8aff..322a33f460 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -761,12 +761,6 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = include/grpc/grpc_security.h \ -include/grpc/impl/codegen/byte_buffer.h \ -include/grpc/impl/codegen/compression_types.h \ -include/grpc/impl/codegen/connectivity_state.h \ -include/grpc/impl/codegen/grpc_types.h \ -include/grpc/impl/codegen/propagation_bits.h \ -include/grpc/impl/codegen/status.h \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 502fe39844..bed391cf67 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -761,12 +761,6 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = include/grpc/grpc_security.h \ -include/grpc/impl/codegen/byte_buffer.h \ -include/grpc/impl/codegen/compression_types.h \ -include/grpc/impl/codegen/connectivity_state.h \ -include/grpc/impl/codegen/grpc_types.h \ -include/grpc/impl/codegen/propagation_bits.h \ -include/grpc/impl/codegen/status.h \ include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 16b2742ff3..707c521065 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2965,7 +2965,8 @@ }, { "deps": [ - "gpr" + "gpr", + "grpc_codegen_lib" ], "headers": [ "include/grpc/byte_buffer.h", @@ -2974,12 +2975,6 @@ "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/grpc_security.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/grpc_filter.h", @@ -3121,12 +3116,6 @@ "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/grpc_security.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/context.c", @@ -3494,7 +3483,8 @@ }, { "deps": [ - "gpr" + "gpr", + "grpc_codegen_lib" ], "headers": [ "include/grpc/byte_buffer.h", @@ -3502,12 +3492,6 @@ "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/grpc_filter.h", @@ -3634,12 +3618,6 @@ "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/context.c", @@ -3945,119 +3923,10 @@ "test/core/util/test_tcp_server.h" ] }, - { - "deps": [], - "headers": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h" - ], - "language": "c++", - "name": "codegen_lib", - "src": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "src/cpp/codegen/grpc_library.cc" - ] - }, { "deps": [ - "grpc" + "grpc", + "grpc++_codegen_lib" ], "headers": [ "include/grpc++/alarm.h", @@ -4070,36 +3939,6 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -4134,20 +3973,6 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/client/secure_credentials.h", "src/cpp/common/create_auth_context.h", @@ -4169,36 +3994,6 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -4233,20 +4028,6 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -4257,7 +4038,6 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", - "src/cpp/codegen/grpc_library.cc", "src/cpp/common/alarm.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/call.cc", @@ -4292,67 +4072,54 @@ { "deps": [], "headers": [ - "test/cpp/util/test_config.h" - ], - "language": "c++", - "name": "grpc++_test_config", - "src": [ - "test/cpp/util/test_config.cc", - "test/cpp/util/test_config.h" - ] - }, - { - "deps": [ - "grpc++", - "grpc_test_util" - ], - "headers": [ - "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h", - "src/proto/grpc/testing/duplicate/echo_duplicate.pb.h", - "src/proto/grpc/testing/echo.grpc.pb.h", - "src/proto/grpc/testing/echo.pb.h", - "src/proto/grpc/testing/echo_messages.grpc.pb.h", - "src/proto/grpc/testing/echo_messages.pb.h", - "test/cpp/end2end/test_service_impl.h", - "test/cpp/util/byte_buffer_proto_helper.h", - "test/cpp/util/cli_call.h", - "test/cpp/util/create_test_channel.h", - "test/cpp/util/string_ref_helper.h", - "test/cpp/util/subprocess.h" - ], - "language": "c++", - "name": "grpc++_test_util", - "src": [ - "test/cpp/end2end/test_service_impl.cc", - "test/cpp/end2end/test_service_impl.h", - "test/cpp/util/byte_buffer_proto_helper.cc", - "test/cpp/util/byte_buffer_proto_helper.h", - "test/cpp/util/cli_call.cc", - "test/cpp/util/cli_call.h", - "test/cpp/util/create_test_channel.cc", - "test/cpp/util/create_test_channel.h", - "test/cpp/util/string_ref_helper.cc", - "test/cpp/util/string_ref_helper.h", - "test/cpp/util/subprocess.cc", - "test/cpp/util/subprocess.h" - ] - }, - { - "deps": [ - "gpr", - "grpc_unsecure" + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" ], - "headers": [ - "include/grpc++/alarm.h", - "include/grpc++/channel.h", - "include/grpc++/client_context.h", - "include/grpc++/completion_queue.h", - "include/grpc++/create_channel.h", - "include/grpc++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.h", - "include/grpc++/impl/client_unary_call.h", + "language": "c++", + "name": "grpc++_codegen_lib", + "src": [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", "include/grpc++/impl/codegen/call.h", @@ -4383,6 +4150,88 @@ "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "src/cpp/codegen/grpc_library.cc" + ] + }, + { + "deps": [], + "headers": [ + "test/cpp/util/test_config.h" + ], + "language": "c++", + "name": "grpc++_test_config", + "src": [ + "test/cpp/util/test_config.cc", + "test/cpp/util/test_config.h" + ] + }, + { + "deps": [ + "grpc++", + "grpc_test_util" + ], + "headers": [ + "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h", + "src/proto/grpc/testing/duplicate/echo_duplicate.pb.h", + "src/proto/grpc/testing/echo.grpc.pb.h", + "src/proto/grpc/testing/echo.pb.h", + "src/proto/grpc/testing/echo_messages.grpc.pb.h", + "src/proto/grpc/testing/echo_messages.pb.h", + "test/cpp/end2end/test_service_impl.h", + "test/cpp/util/byte_buffer_proto_helper.h", + "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.h", + "test/cpp/util/string_ref_helper.h", + "test/cpp/util/subprocess.h" + ], + "language": "c++", + "name": "grpc++_test_util", + "src": [ + "test/cpp/end2end/test_service_impl.cc", + "test/cpp/end2end/test_service_impl.h", + "test/cpp/util/byte_buffer_proto_helper.cc", + "test/cpp/util/byte_buffer_proto_helper.h", + "test/cpp/util/cli_call.cc", + "test/cpp/util/cli_call.h", + "test/cpp/util/create_test_channel.cc", + "test/cpp/util/create_test_channel.h", + "test/cpp/util/string_ref_helper.cc", + "test/cpp/util/string_ref_helper.h", + "test/cpp/util/subprocess.cc", + "test/cpp/util/subprocess.h" + ] + }, + { + "deps": [ + "gpr", + "grpc++_codegen_lib", + "grpc_unsecure" + ], + "headers": [ + "include/grpc++/alarm.h", + "include/grpc++/channel.h", + "include/grpc++/client_context.h", + "include/grpc++/completion_queue.h", + "include/grpc++/create_channel.h", + "include/grpc++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", + "include/grpc++/grpc++.h", + "include/grpc++/impl/call.h", + "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -4417,20 +4266,6 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", @@ -4449,36 +4284,6 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -4513,20 +4318,6 @@ "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -4535,7 +4326,6 @@ "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/codegen/grpc_library.cc", "src/cpp/common/alarm.cc", "src/cpp/common/call.cc", "src/cpp/common/channel_arguments.cc", @@ -4564,71 +4354,45 @@ { "deps": [], "headers": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h" + ], + "language": "c++", + "name": "grpc_codegen_lib", + "src": [ + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h" + ] + }, + { + "deps": [ + "grpc++_codegen_lib", + "grpc_codegen_lib" + ], + "headers": [ "include/grpc++/support/config.h", "include/grpc++/support/config_protobuf.h", "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", "include/grpc/impl/codegen/time.h", "src/compiler/config.h", "src/compiler/cpp_generator.h", @@ -4647,72 +4411,22 @@ "language": "c++", "name": "grpc_plugin_support", "src": [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", "include/grpc++/support/config.h", "include/grpc++/support/config_protobuf.h", "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/alloc.h", "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc/impl/codegen/time.h", "src/compiler/config.h", "src/compiler/cpp_generator.cc", "src/compiler/cpp_generator.h", @@ -4730,8 +4444,7 @@ "src/compiler/ruby_generator.h", "src/compiler/ruby_generator_helpers-inl.h", "src/compiler/ruby_generator_map-inl.h", - "src/compiler/ruby_generator_string-inl.h", - "src/cpp/codegen/grpc_library.cc" + "src/compiler/ruby_generator_string-inl.h" ] }, { diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index b30941ff73..a3a4ee106f 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -22,6 +22,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" @@ -50,6 +51,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 4f13f7600e..b5a7c749db 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -22,6 +22,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" @@ -50,6 +51,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" @@ -75,17 +77,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_tcp_server", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "codegen_lib", "vcxproj\.\codegen_lib\codegen_lib.vcxproj", "{B39FD502-C1A9-FB66-4240-7FD06B073546}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\grpc++.vcxproj", "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" ProjectSection(myProperties) = preProject lib = "True" EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_codegen_lib", "vcxproj\.\grpc++_codegen_lib\grpc++_codegen_lib.vcxproj", "{C90648F0-DF66-738D-A337-C5346B58445E}" + ProjectSection(myProperties) = preProject + lib = "True" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" @@ -95,6 +98,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{53765FE1-7835-FDD0-44E4-95E2178F5ACB}" + ProjectSection(myProperties) = preProject + lib = "True" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boringssl", "vcxproj\.\boringssl\boringssl.vcxproj", "{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}" @@ -305,22 +314,6 @@ Global {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|Win32.Build.0 = Release|Win32 {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.ActiveCfg = Release|x64 {E3110C46-A148-FF65-08FD-3324829BE7FE}.Release-DLL|x64.Build.0 = Release|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|Win32.ActiveCfg = Debug|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|x64.ActiveCfg = Debug|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|Win32.ActiveCfg = Release|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|x64.ActiveCfg = Release|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|Win32.Build.0 = Debug|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug|x64.Build.0 = Debug|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|Win32.Build.0 = Release|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release|x64.Build.0 = Release|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Debug-DLL|x64.Build.0 = Debug|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|Win32.Build.0 = Release|Win32 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|x64.ActiveCfg = Release|x64 - {B39FD502-C1A9-FB66-4240-7FD06B073546}.Release-DLL|x64.Build.0 = Release|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|Win32.ActiveCfg = Debug|Win32 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Debug|x64.ActiveCfg = Debug|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release|Win32.ActiveCfg = Release|Win32 @@ -337,6 +330,22 @@ Global {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.Build.0 = Release-DLL|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|Win32.ActiveCfg = Debug|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|x64.ActiveCfg = Debug|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release|Win32.ActiveCfg = Release|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release|x64.ActiveCfg = Release|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|Win32.Build.0 = Debug|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|x64.Build.0 = Debug|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release|Win32.Build.0 = Release|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release|x64.Build.0 = Release|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|x64.Build.0 = Debug|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|Win32.Build.0 = Release|Win32 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|x64.ActiveCfg = Release|x64 + {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|x64.Build.0 = Release|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|Win32.ActiveCfg = Debug|Win32 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|x64.ActiveCfg = Debug|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|Win32.ActiveCfg = Release|Win32 @@ -353,6 +362,22 @@ Global {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|x64.Build.0 = Release-DLL|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|Win32.ActiveCfg = Debug|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|x64.ActiveCfg = Debug|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|Win32.ActiveCfg = Release|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|x64.ActiveCfg = Release|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|Win32.Build.0 = Debug|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|x64.Build.0 = Debug|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|Win32.Build.0 = Release|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|x64.Build.0 = Release|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|x64.Build.0 = Debug|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|Win32.Build.0 = Release|Win32 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|x64.ActiveCfg = Release|x64 + {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|x64.Build.0 = Release|x64 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|Win32.ActiveCfg = Debug|Win32 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|x64.ActiveCfg = Debug|x64 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/grpc_csharp_ext.sln b/vsprojects/grpc_csharp_ext.sln index 11d2204ba5..b4b5fc10dc 100644 --- a/vsprojects/grpc_csharp_ext.sln +++ b/vsprojects/grpc_csharp_ext.sln @@ -14,6 +14,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" @@ -22,6 +23,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext", "vcxproj\.\grpc_csharp_ext\grpc_csharp_ext.vcxproj", "{D64C6D63-4458-4A88-AB38-35678384A7E4}" diff --git a/vsprojects/grpc_protoc_plugins.sln b/vsprojects/grpc_protoc_plugins.sln index ef1cbb8e57..5f7079d9b4 100644 --- a/vsprojects/grpc_protoc_plugins.sln +++ b/vsprojects/grpc_protoc_plugins.sln @@ -7,6 +7,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxp ProjectSection(myProperties) = preProject lib = "True" EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_cpp_plugin", "vcxproj\.\grpc_cpp_plugin\grpc_cpp_plugin.vcxproj", "{7E51A25F-AC59-488F-906C-C60FAAE706AA}" ProjectSection(myProperties) = preProject diff --git a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj deleted file mode 100644 index e4becdc8cb..0000000000 --- a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj +++ /dev/null @@ -1,216 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {B39FD502-C1A9-FB66-4240-7FD06B073546} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - codegen_lib - - - codegen_lib - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters b/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters deleted file mode 100644 index d82cf0b409..0000000000 --- a/vsprojects/vcxproj/codegen_lib/codegen_lib.vcxproj.filters +++ /dev/null @@ -1,199 +0,0 @@ - - - - - src\cpp\codegen - - - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - - - - {26708a09-f550-4ca3-5b87-0c59b8d2a990} - - - {04860d30-add0-446c-0616-9a868fc666db} - - - {b6dbcd21-b90a-418f-c573-1506c332b8e8} - - - {a956ffb7-4d13-0bdb-59a3-b4c8aa3f474e} - - - {875841b7-cb83-f37e-f577-fd760171b82a} - - - {3498847d-d81a-00e2-5cac-4848d1a0fc1d} - - - {9bcd27c0-64e4-9efd-2410-c61ff61ceba4} - - - {16750fe6-ad5d-a9e8-3b9a-aa950b684a1d} - - - {4c1ab54d-a99c-092e-0fa1-21567544a045} - - - {e68d006c-11d5-e865-91fe-bca4384da93a} - - - {626b856b-6ded-b6a2-feb8-2469a1c3e29c} - - - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 89057fea8a..0def0cad84 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -302,36 +302,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -341,20 +311,6 @@ - - - - - - - - - - - - - - @@ -421,13 +377,14 @@ - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {C90648F0-DF66-738D-A337-C5346B58445E} + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 0dfb24ee94..e68b0c82ab 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -97,9 +97,6 @@ src\cpp\util - - src\cpp\codegen - @@ -234,96 +231,6 @@ include\grpc++\support - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - @@ -347,57 +254,12 @@ src\cpp\server - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - {82445414-24cd-8198-1fe1-4267c3f3df00} - - {16946104-53ac-ac76-68b9-f9ec77ea6fae} - {784a0281-f547-aeb0-9f55-b26b7de9c769} @@ -407,24 +269,12 @@ {0da8cd95-314f-da1b-5ce7-7791a5be1f1a} - - {a3e7f28b-a7c7-7364-d402-edb1bfa414a4} - - - {20cbcf00-994a-300a-5184-bda96c6f45e4} - {a80eb32b-1be9-1187-5f40-30d92accecc8} {a5c10dae-f715-2a30-1066-d22f8bc94cb2} - - {48c3b0ae-c00f-fa20-6965-b73da65d71cb} - - - {dc8bfccd-341f-26f0-8ee4-47dde62a6dd1} - {328ff211-2886-406e-56f9-18ba1686f363} @@ -434,9 +284,6 @@ {7febf32a-d7a6-76fa-9e17-f189f591c062} - - {3c3e27f4-d3d9-3c42-5204-08b5e839f2de} - {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj new file mode 100644 index 0000000000..799ae6e09a --- /dev/null +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -0,0 +1,210 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C90648F0-DF66-738D-A337-C5346B58445E} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc++_codegen_lib + + + grpc++_codegen_lib + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters new file mode 100644 index 0000000000..b3e6515b28 --- /dev/null +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -0,0 +1,181 @@ + + + + + src\cpp\codegen + + + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + + + + {cf409044-341b-37b5-03f3-0b09c3c474c4} + + + {cddccffd-da89-18ad-da57-0c9d704a4633} + + + {cb8cb5ad-cf23-a491-046c-1c0688be53ac} + + + {a734ff7f-2489-0c04-3fc6-35e361240cf1} + + + {ffc473f2-ece4-fedf-238f-f161e5c3d5e7} + + + {89065a9e-e4a0-e5e4-32e9-51cd4cadab46} + + + {45ab28cb-74e7-1a53-77c1-bbf2ec383fa2} + + + {311586c5-1a08-e1ba-8dd8-d1cbe10156b3} + + + {e9bdb195-1cf9-a0f4-231c-fcee59eb54ca} + + + {d2e57ea3-c758-0f7c-3bc9-e71dd87bd654} + + + {f93ade18-7c50-7ed9-b8e7-383b11f077c2} + + + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 07b122d2c4..6929b56246 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -302,56 +302,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -408,8 +364,6 @@ - - @@ -418,6 +372,9 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + {C90648F0-DF66-738D-A337-C5346B58445E} + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 028773d85c..0b713d25dd 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -82,9 +82,6 @@ src\cpp\util - - src\cpp\codegen - @@ -219,96 +216,6 @@ include\grpc++\support - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - @@ -323,57 +230,12 @@ src\cpp\server - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - {5c4eb19f-d511-e8fd-e1d6-c377cdc7d3b1} - - {f3dd91a8-058b-becf-9e41-eb42c7bc6e55} - {eceb50c0-bb49-3812-b6bd-b0af6df81da7} @@ -383,24 +245,12 @@ {dadc0002-f2ac-451b-a9b8-33b8de10b5fc} - - {ccc364e2-3f28-8bfc-c26e-800dd6f9a9af} - - - {87cae06e-f40c-8fb6-73d6-26c7482ed9da} - {64bf60ff-9192-bb59-dcc8-8a0021e1d016} {0ebf8008-80b9-d6da-e1dc-854bf1ec2195} - - {c1049250-64f6-f900-d2e5-1718e148f1f0} - - - {adf6b8e3-4a4b-cb35-bb3d-568af97b58d1} - {cce6a85d-1111-3834-6825-31e170d93cff} @@ -410,9 +260,6 @@ {ff72923a-6499-8d2a-e0fb-6d574b85d77e} - - {18e9c249-37f0-7f2c-f026-502d48ed8c92} - {ed8e4daa-825f-fbe5-2a45-846ad9165d3d} diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index faef347883..bb116b1b68 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -268,12 +268,6 @@ - - - - - - @@ -727,6 +721,9 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 9afcbf0053..337ca3d2d3 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -468,24 +468,6 @@ include\grpc - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - include\grpc @@ -905,12 +887,6 @@ {880c644d-b84f-cfca-98bd-e145f36232ab} - - {38832702-fee1-b2bc-75d3-923e748dcde9} - - - {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} - {d538af37-07b2-062b-fa2a-d9f882cb2737} diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj new file mode 100644 index 0000000000..945df1b225 --- /dev/null +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc_codegen_lib + + + grpc_codegen_lib + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters new file mode 100644 index 0000000000..fb8f0e0169 --- /dev/null +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + + + + {1fe03afe-0c52-a706-2c50-4ea691805d81} + + + {386f8a29-15ac-1f26-30ee-d9a605a802be} + + + {9828c5d3-4dc2-f116-97bf-015089243c94} + + + {0e88ed03-ed1e-49c0-15d7-69934b433494} + + + + diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj index 0b07b8be60..d73e159740 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -147,42 +147,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -214,20 +178,6 @@ - - - - - - - - - - - - - - @@ -240,8 +190,14 @@ - - + + + + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + + + {C90648F0-DF66-738D-A337-C5346B58445E} + diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters index 7d70c573cc..b1a63eb41f 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters @@ -16,119 +16,8 @@ src\compiler - - src\cpp\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen\security - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - include\grpc\impl\codegen @@ -218,48 +107,6 @@ src\compiler - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - @@ -272,15 +119,6 @@ {893c09ee-e315-e763-9d9d-37522ba2f51c} - - {3e8c71a4-8a06-a577-2799-2224a1ad1f1b} - - - {ec2a6e26-915b-ba1b-4f59-f361dc01105c} - - - {c1593bf9-5ef8-cb28-e46b-543153918a3f} - {1c34d005-1ffb-8a31-881a-c6bb431cda69} @@ -296,12 +134,6 @@ {0e6b1e6c-7299-59ce-d757-619bcddd5441} - - {29d80aab-9e9d-0417-6dfa-59dec47c9883} - - - {c0d4a389-f341-8385-4534-fe9d8fb09952} - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 4edcfab829..33c8778afd 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -263,12 +263,6 @@ - - - - - - @@ -663,6 +657,9 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 11510b5ceb..a6c058d85b 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -420,24 +420,6 @@ include\grpc - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - include\grpc @@ -800,12 +782,6 @@ {77b9717b-b8d8-dd5f-14bb-a3e96809a70a} - - {10cfa248-c60f-376f-e7ae-2a7d7d8e81f5} - - - {03cc6735-c734-7017-4000-a435f29d55c3} - {aaf326a1-c884-46ea-875a-cbbd9983e539} -- cgit v1.2.3 From a37d9d8c5911c9de56e94a66e9480336e85f1e08 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 18 Feb 2016 15:30:56 -0800 Subject: moved grpc_library.cc moved out of codegen --- BUILD | 2 +- Makefile | 3 ++- build.yaml | 4 ++-- tools/doxygen/Doxyfile.c++.internal | 1 + tools/run_tests/sources_and_headers.json | 4 ++-- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 2 ++ vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 ++++++ .../vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 4 ---- .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters | 14 -------------- 9 files changed, 16 insertions(+), 24 deletions(-) diff --git a/BUILD b/BUILD index 8b4219f112..66f9467254 100644 --- a/BUILD +++ b/BUILD @@ -775,6 +775,7 @@ cc_library( "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", "src/cpp/client/secure_credentials.cc", + "src/cpp/codegen/grpc_library.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_channel_arguments.cc", @@ -883,7 +884,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "src/cpp/codegen/grpc_library.cc", ], hdrs = [ "include/grpc++/impl/codegen/async_stream.h", diff --git a/Makefile b/Makefile index 3e9058187f..3891b0f827 100644 --- a/Makefile +++ b/Makefile @@ -2952,6 +2952,7 @@ endif LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ + src/cpp/codegen/grpc_library.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ @@ -3094,7 +3095,6 @@ endif LIBGRPC++_CODEGEN_LIB_SRC = \ - src/cpp/codegen/grpc_library.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ @@ -13040,6 +13040,7 @@ src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP) src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP) src/core/tsi/transport_security.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) +src/cpp/codegen/grpc_library.cc: $(OPENSSL_DEP) src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 0ddca8dcc5..a8c38d0abf 100644 --- a/build.yaml +++ b/build.yaml @@ -643,6 +643,7 @@ libs: - src/cpp/server/secure_server_credentials.h src: - src/cpp/client/secure_credentials.cc + - src/cpp/codegen/grpc_library.cc - src/cpp/common/auth_property_iterator.cc - src/cpp/common/secure_auth_context.cc - src/cpp/common/secure_channel_arguments.cc @@ -706,8 +707,7 @@ libs: - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_win32.h - include/grpc/impl/codegen/time.h - src: - - src/cpp/codegen/grpc_library.cc + src: [] private: true secure: false - name: grpc++_test_config diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 50ed2f6d34..7338ac58e3 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -812,6 +812,7 @@ src/cpp/common/create_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ src/cpp/client/secure_credentials.cc \ +src/cpp/codegen/grpc_library.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 90b0177e54..adef0c985c 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4044,6 +4044,7 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", + "src/cpp/codegen/grpc_library.cc", "src/cpp/common/alarm.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/call.cc", @@ -4169,8 +4170,7 @@ "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "src/cpp/codegen/grpc_library.cc" + "include/grpc/impl/codegen/time.h" ] }, { diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 0def0cad84..a4f1b25c5c 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -315,6 +315,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index e68b0c82ab..a827051f58 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -4,6 +4,9 @@ src\cpp\client + + src\cpp\codegen + src\cpp\common @@ -284,6 +287,9 @@ {7febf32a-d7a6-76fa-9e17-f189f591c062} + + {3c3e27f4-d3d9-3c42-5204-08b5e839f2de} + {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 799ae6e09a..b01064c954 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -194,10 +194,6 @@ - - - - diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index b3e6515b28..e5918705b6 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -1,10 +1,5 @@ - - - src\cpp\codegen - - include\grpc++\impl\codegen @@ -167,15 +162,6 @@ {311586c5-1a08-e1ba-8dd8-d1cbe10156b3} - - {e9bdb195-1cf9-a0f4-231c-fcee59eb54ca} - - - {d2e57ea3-c758-0f7c-3bc9-e71dd87bd654} - - - {f93ade18-7c50-7ed9-b8e7-383b11f077c2} - -- cgit v1.2.3 From bac76af099e9720ef3003e27f3b5405e79a1cc9c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 18 Feb 2016 15:56:40 -0800 Subject: Fixed sanity --- BUILD | 43 +++++++++++++++------- Makefile | 38 ++++++++++++++++--- build.yaml | 22 ++++------- package.json | 14 +++++++ tools/run_tests/sources_and_headers.json | 36 ++++++++++++++++-- vsprojects/grpc.sln | 3 ++ .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 7 +++- .../grpc++_codegen_lib.vcxproj.filters | 2 - .../grpc_codegen_lib/grpc_codegen_lib.vcxproj | 14 +++++++ .../grpc_codegen_lib.vcxproj.filters | 42 +++++++++++++++++++++ 10 files changed, 180 insertions(+), 41 deletions(-) diff --git a/BUILD b/BUILD index 66f9467254..dc59f9396f 100644 --- a/BUILD +++ b/BUILD @@ -870,20 +870,6 @@ cc_library( cc_library( name = "grpc++_codegen_lib", srcs = [ - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", ], hdrs = [ "include/grpc++/impl/codegen/async_stream.h", @@ -916,12 +902,27 @@ cc_library( "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", ], includes = [ "include", ".", ], deps = [ + ":grpc_codegen_lib", ], ) @@ -1031,6 +1032,20 @@ cc_library( "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", ], includes = [ "include", diff --git a/Makefile b/Makefile index 3891b0f827..fc5b6cb9e0 100644 --- a/Makefile +++ b/Makefile @@ -3127,6 +3127,20 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/sync_no_cxx11.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ LIBGRPC++_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_CODEGEN_LIB_SRC)))) @@ -3153,18 +3167,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc_codegen_lib.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc_codegen_lib-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc_codegen_lib else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc_codegen_lib $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so endif @@ -3420,6 +3434,20 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/grpc_types.h \ include/grpc/impl/codegen/propagation_bits.h \ include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC)))) diff --git a/build.yaml b/build.yaml index a8c38d0abf..1e51705a9f 100644 --- a/build.yaml +++ b/build.yaml @@ -692,22 +692,12 @@ libs: - include/grpc++/impl/codegen/sync_no_cxx11.h - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h - headers: - - include/grpc/impl/codegen/alloc.h - - include/grpc/impl/codegen/atm.h - - include/grpc/impl/codegen/atm_gcc_atomic.h - - include/grpc/impl/codegen/atm_gcc_sync.h - - include/grpc/impl/codegen/atm_win32.h - - include/grpc/impl/codegen/log.h - - include/grpc/impl/codegen/port_platform.h - - include/grpc/impl/codegen/slice.h - - include/grpc/impl/codegen/slice_buffer.h - - include/grpc/impl/codegen/sync.h - - include/grpc/impl/codegen/sync_generic.h - - include/grpc/impl/codegen/sync_posix.h - - include/grpc/impl/codegen/sync_win32.h - - include/grpc/impl/codegen/time.h + headers: [] src: [] + deps: + - grpc_codegen_lib + filegroups: + - gpr_codegen private: true secure: false - name: grpc++_test_config @@ -767,6 +757,8 @@ libs: - include/grpc/impl/codegen/status.h headers: [] src: [] + filegroups: + - gpr_codegen private: true secure: false - name: grpc_plugin_support diff --git a/package.json b/package.json index 7fdef94732..a704f2b400 100644 --- a/package.json +++ b/package.json @@ -786,6 +786,20 @@ "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", "third_party/zlib/crc32.h", "third_party/zlib/deflate.h", "third_party/zlib/gzguts.h", diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index adef0c985c..6383377f2e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4077,7 +4077,9 @@ ] }, { - "deps": [], + "deps": [ + "grpc_codegen_lib" + ], "headers": [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", @@ -4360,22 +4362,50 @@ { "deps": [], "headers": [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h" + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" ], "language": "c++", "name": "grpc_codegen_lib", "src": [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h" + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" ] }, { diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index b5a7c749db..3968f412f4 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -90,6 +90,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_codegen_lib", "vcxpr ProjectSection(myProperties) = preProject lib = "True" EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" ProjectSection(myProperties) = preProject diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index b01064c954..497d7c9c03 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -177,8 +177,6 @@ - - @@ -194,6 +192,11 @@ + + + {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + + diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index e5918705b6..582d88b8cc 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -91,8 +91,6 @@ include\grpc++\impl\codegen - - include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj index 945df1b225..43fe0245ac 100644 --- a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj @@ -153,6 +153,20 @@ + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters index fb8f0e0169..6ce52752fc 100644 --- a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters @@ -19,6 +19,48 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + -- cgit v1.2.3 From 4af3de2d6f7d3ed452274404792258d423db3c53 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 19 Feb 2016 13:57:55 -0800 Subject: actually made the codegen_lib targets private now --- BUILD | 95 ----------------------------------------------------- Makefile | 74 ++--------------------------------------- build.yaml | 6 ++-- vsprojects/grpc.sln | 45 ------------------------- 4 files changed, 5 insertions(+), 215 deletions(-) diff --git a/BUILD b/BUILD index dc59f9396f..ea1dcfaad3 100644 --- a/BUILD +++ b/BUILD @@ -867,66 +867,6 @@ cc_library( ) -cc_library( - name = "grpc++_codegen_lib", - srcs = [ - ], - hdrs = [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ":grpc_codegen_lib", - ], -) - - cc_library( name = "grpc++_unsecure", srcs = [ @@ -1021,41 +961,6 @@ cc_library( ) -cc_library( - name = "grpc_codegen_lib", - srcs = [ - ], - hdrs = [ - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ], -) - - cc_library( name = "grpc_plugin_support", srcs = [ diff --git a/Makefile b/Makefile index fc5b6cb9e0..ff85883054 100644 --- a/Makefile +++ b/Makefile @@ -1076,13 +1076,13 @@ static: static_c static_cxx static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_zookeeper_libs -static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a +static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a shared: shared_c shared_cxx shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_zookeeper_libs -shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) +shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) ifeq ($(HAS_ZOOKEEPER),true) @@ -1117,7 +1117,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a ifeq ($(HAS_ZOOKEEPER),true) privatelibs_zookeeper: @@ -1685,12 +1685,8 @@ strip-static_cxx: static_cxx ifeq ($(CONFIG),opt) $(E) "[STRIP] Stripping libgrpc++.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(E) "[STRIP] Stripping libgrpc++_codegen_lib.a" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(E) "[STRIP] Stripping libgrpc++_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a - $(E) "[STRIP] Stripping libgrpc_codegen_lib.a" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a endif strip-shared_c: shared_c @@ -1711,12 +1707,8 @@ strip-shared_cxx: shared_cxx ifeq ($(CONFIG),opt) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) - $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) - $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) endif strip-shared_csharp: shared_csharp @@ -2011,15 +2003,9 @@ install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx $(E) "[INSTALL] Installing libgrpc++.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a - $(E) "[INSTALL] Installing libgrpc++_codegen_lib.a" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(prefix)/lib/libgrpc++_codegen_lib.a $(E) "[INSTALL] Installing libgrpc++_unsecure.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(prefix)/lib/libgrpc++_unsecure.a - $(E) "[INSTALL] Installing libgrpc_codegen_lib.a" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(prefix)/lib/libgrpc_codegen_lib.a @@ -2078,15 +2064,6 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so -endif - $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -ifeq ($(SYSTEM),MINGW32) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib-imp.a $(prefix)/lib/libgrpc++_codegen_lib-imp.a -else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_codegen_lib.so.0 - $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_codegen_lib.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib @@ -2096,15 +2073,6 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so -endif - $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -ifeq ($(SYSTEM),MINGW32) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib-imp.a $(prefix)/lib/libgrpc_codegen_lib-imp.a -else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_codegen_lib.so.0 - $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_codegen_lib.so endif ifeq ($(HAS_ZOOKEEPER),true) endif @@ -3151,7 +3119,6 @@ ifeq ($(NO_PROTOBUF),true) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a: protobuf_dep_error -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error else @@ -3166,23 +3133,6 @@ endif -ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc_codegen_lib.$(SHARED_EXT) - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc_codegen_lib-imp -else -$(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.$(SHARED_EXT) - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` -ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc_codegen_lib -else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc_codegen_lib - $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so.0 - $(Q) ln -sf $(SHARED_PREFIX)grpc++_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib$(SHARED_VERSION).so -endif -endif endif @@ -3458,7 +3408,6 @@ ifeq ($(NO_PROTOBUF),true) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: protobuf_dep_error -$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error else @@ -3473,23 +3422,6 @@ endif -ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_codegen_lib.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_codegen_lib$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -else -$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CODEGEN_LIB_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` -ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_codegen_lib.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CODEGEN_LIB_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) - $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).so.0 - $(Q) ln -sf $(SHARED_PREFIX)grpc_codegen_lib$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib$(SHARED_VERSION).so -endif -endif endif diff --git a/build.yaml b/build.yaml index 1e51705a9f..4de2dfe00e 100644 --- a/build.yaml +++ b/build.yaml @@ -659,7 +659,7 @@ libs: secure: check vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' - name: grpc++_codegen_lib - build: all + build: private language: c++ public_headers: - include/grpc++/impl/codegen/async_stream.h @@ -698,7 +698,6 @@ libs: - grpc_codegen_lib filegroups: - gpr_codegen - private: true secure: false - name: grpc++_test_config build: private @@ -746,7 +745,7 @@ libs: secure: false vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}' - name: grpc_codegen_lib - build: all + build: private language: c++ public_headers: - include/grpc/impl/codegen/byte_buffer.h @@ -759,7 +758,6 @@ libs: src: [] filegroups: - gpr_codegen - private: true secure: false - name: grpc_plugin_support build: protoc diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 3968f412f4..4f4203d65b 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -86,14 +86,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_codegen_lib", "vcxproj\.\grpc++_codegen_lib\grpc++_codegen_lib.vcxproj", "{C90648F0-DF66-738D-A337-C5346B58445E}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" ProjectSection(myProperties) = preProject lib = "True" @@ -104,11 +96,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{53765FE1-7835-FDD0-44E4-95E2178F5ACB}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boringssl", "vcxproj\.\boringssl\boringssl.vcxproj", "{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}" ProjectSection(myProperties) = preProject lib = "True" @@ -333,22 +320,6 @@ Global {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|Win32.ActiveCfg = Debug|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|x64.ActiveCfg = Debug|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release|Win32.ActiveCfg = Release|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release|x64.ActiveCfg = Release|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|Win32.Build.0 = Debug|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug|x64.Build.0 = Debug|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release|Win32.Build.0 = Release|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release|x64.Build.0 = Release|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Debug-DLL|x64.Build.0 = Debug|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|Win32.Build.0 = Release|Win32 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|x64.ActiveCfg = Release|x64 - {C90648F0-DF66-738D-A337-C5346B58445E}.Release-DLL|x64.Build.0 = Release|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|Win32.ActiveCfg = Debug|Win32 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|x64.ActiveCfg = Debug|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|Win32.ActiveCfg = Release|Win32 @@ -365,22 +336,6 @@ Global {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|Win32.ActiveCfg = Debug|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|x64.ActiveCfg = Debug|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|Win32.ActiveCfg = Release|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|x64.ActiveCfg = Release|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|Win32.Build.0 = Debug|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug|x64.Build.0 = Debug|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|Win32.Build.0 = Release|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release|x64.Build.0 = Release|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Debug-DLL|x64.Build.0 = Debug|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|Win32.Build.0 = Release|Win32 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|x64.ActiveCfg = Release|x64 - {53765FE1-7835-FDD0-44E4-95E2178F5ACB}.Release-DLL|x64.Build.0 = Release|x64 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|Win32.ActiveCfg = Debug|Win32 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|x64.ActiveCfg = Debug|x64 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|Win32.ActiveCfg = Release|Win32 -- cgit v1.2.3 From aee7cf1d32a6d08396deec2534447f163605b3f7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 19 Feb 2016 14:05:47 -0800 Subject: added uuids for VS --- build.yaml | 2 ++ vsprojects/buildtests_c.sln | 4 ++-- vsprojects/grpc.sln | 8 ++++---- vsprojects/grpc_csharp_ext.sln | 4 ++-- vsprojects/grpc_protoc_plugins.sln | 4 ++-- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 2 +- vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 4 ++-- vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj | 2 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 2 +- vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj | 2 +- .../vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj | 4 ++-- vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 2 +- 12 files changed, 21 insertions(+), 19 deletions(-) diff --git a/build.yaml b/build.yaml index 4de2dfe00e..68c9b89040 100644 --- a/build.yaml +++ b/build.yaml @@ -699,6 +699,7 @@ libs: filegroups: - gpr_codegen secure: false + vs_project_guid: '{AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}' - name: grpc++_test_config build: private language: c++ @@ -759,6 +760,7 @@ libs: filegroups: - gpr_codegen secure: false + vs_project_guid: '{A828FD72-44CE-4EA5-8966-6E4624458D58}' - name: grpc_plugin_support build: protoc language: c++ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index a3a4ee106f..06c0957291 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -22,7 +22,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" @@ -51,7 +51,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 4f4203d65b..4fcc154464 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -22,7 +22,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" @@ -51,7 +51,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" @@ -83,7 +83,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" @@ -93,7 +93,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boringssl", "vcxproj\.\boringssl\boringssl.vcxproj", "{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}" diff --git a/vsprojects/grpc_csharp_ext.sln b/vsprojects/grpc_csharp_ext.sln index b4b5fc10dc..a4d78e198c 100644 --- a/vsprojects/grpc_csharp_ext.sln +++ b/vsprojects/grpc_csharp_ext.sln @@ -14,7 +14,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" @@ -23,7 +23,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext", "vcxproj\.\grpc_csharp_ext\grpc_csharp_ext.vcxproj", "{D64C6D63-4458-4A88-AB38-35678384A7E4}" diff --git a/vsprojects/grpc_protoc_plugins.sln b/vsprojects/grpc_protoc_plugins.sln index 5f7079d9b4..7e4466acbb 100644 --- a/vsprojects/grpc_protoc_plugins.sln +++ b/vsprojects/grpc_protoc_plugins.sln @@ -8,8 +8,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxp lib = "True" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} = {53765FE1-7835-FDD0-44E4-95E2178F5ACB} - {C90648F0-DF66-738D-A337-C5346B58445E} = {C90648F0-DF66-738D-A337-C5346B58445E} + {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_cpp_plugin", "vcxproj\.\grpc_cpp_plugin\grpc_cpp_plugin.vcxproj", "{7E51A25F-AC59-488F-906C-C60FAAE706AA}" diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index a4f1b25c5c..098f67e2b8 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -385,7 +385,7 @@ {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {C90648F0-DF66-738D-A337-C5346B58445E} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 497d7c9c03..0184a4f1ae 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -19,7 +19,7 @@ - {C90648F0-DF66-738D-A337-C5346B58445E} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} true $(SolutionDir)IntDir\$(MSBuildProjectName)\ @@ -194,7 +194,7 @@ - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 6929b56246..d5dedfafaf 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -373,7 +373,7 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {C90648F0-DF66-738D-A337-C5346B58445E} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 833efcb26e..8d3154fc8c 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -725,7 +725,7 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj index 43fe0245ac..e309b5e01d 100644 --- a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj @@ -19,7 +19,7 @@ - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} true $(SolutionDir)IntDir\$(MSBuildProjectName)\ diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj index d73e159740..5a5a1c4b0e 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -193,10 +193,10 @@ - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} - {C90648F0-DF66-738D-A337-C5346B58445E} + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index ef83d2014b..bf4814f582 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -661,7 +661,7 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {53765FE1-7835-FDD0-44E4-95E2178F5ACB} + {A828FD72-44CE-4EA5-8966-6E4624458D58} -- cgit v1.2.3 From 9f3955c9532dcf7f01cbee38f12c354110d46e73 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 19 Feb 2016 14:54:48 -0800 Subject: Fixed language category for grpc_codegen_lib --- Makefile | 103 +++++++++++-------------- build.yaml | 32 ++++---- test/core/surface/public_headers_must_be_c89.c | 6 ++ tools/run_tests/sources_and_headers.json | 98 +++++++++++------------ vsprojects/buildtests_c.sln | 21 +++++ vsprojects/grpc.sln | 21 +++++ 6 files changed, 159 insertions(+), 122 deletions(-) diff --git a/Makefile b/Makefile index ff85883054..8c8be1ff7b 100644 --- a/Makefile +++ b/Makefile @@ -1102,7 +1102,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc @@ -1117,7 +1117,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a ifeq ($(HAS_ZOOKEEPER),true) privatelibs_zookeeper: @@ -2535,6 +2535,50 @@ endif endif +LIBGRPC_CODEGEN_LIB_SRC = \ + +PUBLIC_HEADERS_C += \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ + +LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC)))) + + +$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: $(ZLIB_DEP) $(LIBGRPC_CODEGEN_LIB_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBGRPC_CODEGEN_LIB_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC_CODEGEN_LIB_OBJS:.o=.dep) +endif + + LIBGRPC_TEST_UTIL_SRC = \ test/core/end2end/data/server1_cert.c \ test/core/end2end/data/server1_key.c \ @@ -3375,61 +3419,6 @@ ifneq ($(NO_DEPS),true) endif -LIBGRPC_CODEGEN_LIB_SRC = \ - -PUBLIC_HEADERS_CXX += \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/status.h \ - include/grpc/impl/codegen/alloc.h \ - include/grpc/impl/codegen/atm.h \ - include/grpc/impl/codegen/atm_gcc_atomic.h \ - include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ - include/grpc/impl/codegen/log.h \ - include/grpc/impl/codegen/port_platform.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/slice_buffer.h \ - include/grpc/impl/codegen/sync.h \ - include/grpc/impl/codegen/sync_generic.h \ - include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ - include/grpc/impl/codegen/time.h \ - -LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC)))) - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. - -$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: protobuf_dep_error - - -else - -$(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC_CODEGEN_LIB_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBGRPC_CODEGEN_LIB_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a -endif - - - - -endif - -ifneq ($(NO_DEPS),true) --include $(LIBGRPC_CODEGEN_LIB_OBJS:.o=.dep) -endif - - LIBGRPC_PLUGIN_SUPPORT_SRC = \ src/compiler/cpp_generator.cc \ src/compiler/csharp_generator.cc \ diff --git a/build.yaml b/build.yaml index 68c9b89040..bd84ff35f3 100644 --- a/build.yaml +++ b/build.yaml @@ -547,6 +547,22 @@ libs: - grpc.dependencies.openssl - grpc.dependencies.zlib vs_project_guid: '{29D16885-7228-4C31-81ED-5F9187C7F2A9}' +- name: grpc_codegen_lib + build: private + language: c + public_headers: + - include/grpc/impl/codegen/byte_buffer.h + - include/grpc/impl/codegen/compression_types.h + - include/grpc/impl/codegen/connectivity_state.h + - include/grpc/impl/codegen/grpc_types.h + - include/grpc/impl/codegen/propagation_bits.h + - include/grpc/impl/codegen/status.h + headers: [] + src: [] + filegroups: + - gpr_codegen + secure: false + vs_project_guid: '{A828FD72-44CE-4EA5-8966-6E4624458D58}' - name: grpc_test_util build: private language: c @@ -745,22 +761,6 @@ libs: - grpc++_base secure: false vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}' -- name: grpc_codegen_lib - build: private - language: c++ - public_headers: - - include/grpc/impl/codegen/byte_buffer.h - - include/grpc/impl/codegen/compression_types.h - - include/grpc/impl/codegen/connectivity_state.h - - include/grpc/impl/codegen/grpc_types.h - - include/grpc/impl/codegen/propagation_bits.h - - include/grpc/impl/codegen/status.h - headers: [] - src: [] - filegroups: - - gpr_codegen - secure: false - vs_project_guid: '{A828FD72-44CE-4EA5-8966-6E4624458D58}' - name: grpc_plugin_support build: protoc language: c++ diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 1dfbdb2aaf..579faa4441 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -39,10 +39,16 @@ #include #include #include +#include +#include +#include +#include #include #include +#include #include #include +#include #include #include #include diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 6383377f2e..ce54430aaa 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3406,6 +3406,55 @@ "src/core/tsi/transport_security_interface.h" ] }, + { + "deps": [], + "headers": [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" + ], + "language": "c", + "name": "grpc_codegen_lib", + "src": [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h" + ] + }, { "deps": [ "gpr", @@ -4359,55 +4408,6 @@ "src/cpp/util/time.cc" ] }, - { - "deps": [], - "headers": [ - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h" - ], - "language": "c++", - "name": "grpc_codegen_lib", - "src": [ - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h" - ] - }, { "deps": [ "grpc++_codegen_lib", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 06c0957291..b846bd1a44 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -25,6 +25,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{A828FD72-44CE-4EA5-8966-6E4624458D58}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" ProjectSection(myProperties) = preProject lib = "True" @@ -1377,6 +1382,22 @@ Global {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.Build.0 = Release-DLL|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.ActiveCfg = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.ActiveCfg = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.ActiveCfg = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.ActiveCfg = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.Build.0 = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.Build.0 = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.Build.0 = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.Build.0 = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.Build.0 = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.Build.0 = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.ActiveCfg = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.Build.0 = Release|x64 {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|x64.ActiveCfg = Debug|x64 {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 4fcc154464..53c04fef56 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -25,6 +25,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{A828FD72-44CE-4EA5-8966-6E4624458D58}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "vcxproj\.\grpc_test_util\grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" ProjectSection(myProperties) = preProject lib = "True" @@ -224,6 +229,22 @@ Global {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.Build.0 = Release-DLL|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.ActiveCfg = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.ActiveCfg = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.ActiveCfg = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.ActiveCfg = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.Build.0 = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.Build.0 = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.Build.0 = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.Build.0 = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.Build.0 = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.Build.0 = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.ActiveCfg = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.Build.0 = Release|x64 {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|x64.ActiveCfg = Debug|x64 {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 -- cgit v1.2.3 From 3711e838709aeb74698b964ef1cd72afe84e0d2d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 19 Feb 2016 16:58:16 -0800 Subject: moar VS fun --- templates/vsprojects/vcxproj_defs.include | 2 +- vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 4 ++++ vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/vsprojects/vcxproj_defs.include b/templates/vsprojects/vcxproj_defs.include index b57c27f76a..ad1d4711fd 100644 --- a/templates/vsprojects/vcxproj_defs.include +++ b/templates/vsprojects/vcxproj_defs.include @@ -213,7 +213,7 @@ ${gen_package_props(packages, repo_root)}\ % endif % endfor - % elif configuration_type != 'StaticLibrary': + % else: diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 0184a4f1ae..811e0bdd18 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -192,6 +192,10 @@ + + + + {A828FD72-44CE-4EA5-8966-6E4624458D58} diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj index e309b5e01d..be8a6f7266 100644 --- a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj @@ -168,6 +168,10 @@ + + + + -- cgit v1.2.3 From ef1bf876657a59a0911ee87e0a6ccb35b5538d5f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 28 Feb 2016 17:37:33 -0800 Subject: ESAN prototype --- Makefile | 8 +++++ build.yaml | 3 ++ src/core/iomgr/exec_ctx.c | 76 ++++++++++++++++++++++++++++++++++++++++ src/core/iomgr/exec_ctx.h | 20 ++++++++--- src/core/iomgr/iomgr.c | 3 ++ src/core/iomgr/workqueue_posix.c | 4 +-- tools/run_tests/configs.json | 3 ++ 7 files changed, 110 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 5be0d146af..5d2f07145f 100644 --- a/Makefile +++ b/Makefile @@ -209,6 +209,14 @@ CPPFLAGS_mutrace = -O0 LDFLAGS_mutrace = -rdynamic DEFINES_mutrace = _DEBUG DEBUG +VALID_CONFIG_esan = 1 +CC_esan = $(DEFAULT_CC) +CXX_esan = $(DEFAULT_CXX) +LD_esan = $(DEFAULT_CC) +LDXX_esan = $(DEFAULT_CXX) +CPPFLAGS_esan = -O0 +DEFINES_esan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER + # General settings. diff --git a/build.yaml b/build.yaml index a277539a05..c025b250e9 100644 --- a/build.yaml +++ b/build.yaml @@ -2724,6 +2724,9 @@ configs: dbg: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG + esan: + CPPFLAGS: -O0 + DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER gcov: CC: gcc CPPFLAGS: -O0 -fprofile-arcs -ftest-coverage -Wno-return-type diff --git a/src/core/iomgr/exec_ctx.c b/src/core/iomgr/exec_ctx.c index 1fd79f6eba..abcdd2fa0a 100644 --- a/src/core/iomgr/exec_ctx.c +++ b/src/core/iomgr/exec_ctx.c @@ -34,9 +34,12 @@ #include "src/core/iomgr/exec_ctx.h" #include +#include +#include #include "src/core/profiling/timers.h" +#ifndef GRPC_EXECUTION_CONTEXT_SANITIZER bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { bool did_something = 0; GPR_TIMER_BEGIN("grpc_exec_ctx_flush", 0); @@ -74,3 +77,76 @@ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, GPR_ASSERT(offload_target_or_null == NULL); grpc_closure_list_move(list, &exec_ctx->closure_list); } + +void grpc_exec_ctx_global_init(void) {} +void grpc_exec_ctx_global_shutdown(void) {} +#else +static gpr_mu g_mu; +static gpr_cv g_cv; +static int g_threads = 0; + +static void run_closure(void *arg) { + grpc_closure *closure = arg; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + closure->cb(&exec_ctx, closure->cb_arg, (closure->final_data & 1) != 0); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(&g_mu); + if (--g_threads == 0) { + gpr_cv_signal(&g_cv); + } + gpr_mu_unlock(&g_mu); +} + +static void start_closure(grpc_closure *closure) { + gpr_thd_id id; + gpr_mu_lock(&g_mu); + g_threads++; + gpr_mu_unlock(&g_mu); + gpr_thd_new(&id, run_closure, closure, NULL); +} + +bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { + return false; +} + +void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { +} + +void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, + bool success, + grpc_workqueue *offload_target_or_null) { + GPR_ASSERT(offload_target_or_null == NULL); + closure->final_data = success; + start_closure(closure); +} + +void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, + grpc_closure_list *list, + grpc_workqueue *offload_target_or_null) { + GPR_ASSERT(offload_target_or_null == NULL); + grpc_closure *p = list->head; + while (p) { + grpc_closure *start = p; + p = grpc_closure_next(start); + start_closure(start); + } + grpc_closure_list r = GRPC_CLOSURE_LIST_INIT; + *list = r; +} + +void grpc_exec_ctx_global_init(void) { + gpr_mu_init(&g_mu); + gpr_cv_init(&g_cv); +} + +void grpc_exec_ctx_global_shutdown(void) { + gpr_mu_lock(&g_mu); + while (g_threads != 0) { + gpr_cv_wait(&g_cv, &g_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&g_mu); + + gpr_mu_destroy(&g_mu); + gpr_cv_destroy(&g_cv); +} +#endif diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index 9a9b2e55fa..3403a978ec 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -36,6 +36,14 @@ #include "src/core/iomgr/closure.h" +/* #define GRPC_EXECUTION_CONTEXT_SANITIZER 1 */ + +/** A workqueue represents a list of work to be executed asynchronously. + Forward declared here to avoid a circular dependency with workqueue.h. */ +struct grpc_workqueue; +typedef struct grpc_workqueue grpc_workqueue; + +#ifndef GRPC_EXECUTION_CONTEXT_SANITIZER /** Execution context. * A bag of data that collects information along a callstack. * Generally created at public API entry points, and passed down as @@ -57,13 +65,12 @@ struct grpc_exec_ctx { grpc_closure_list closure_list; }; -/** A workqueue represents a list of work to be executed asynchronously. - Forward declared here to avoid a circular dependency with workqueue.h. */ -struct grpc_workqueue; -typedef struct grpc_workqueue grpc_workqueue; - #define GRPC_EXEC_CTX_INIT \ { GRPC_CLOSURE_LIST_INIT } +#else +struct grpc_exec_ctx {}; +#define GRPC_EXEC_CTX_INIT {} +#endif /** Flush any work that has been enqueued onto this grpc_exec_ctx. * Caller must guarantee that no interfering locks are held. @@ -82,4 +89,7 @@ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, grpc_closure_list *list, grpc_workqueue *offload_target_or_null); +void grpc_exec_ctx_global_init(void); +void grpc_exec_ctx_global_shutdown(void); + #endif diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c index 04580150f3..bd279f6d79 100644 --- a/src/core/iomgr/iomgr.c +++ b/src/core/iomgr/iomgr.c @@ -42,6 +42,7 @@ #include #include +#include "src/core/iomgr/exec_ctx.h" #include "src/core/iomgr/iomgr_internal.h" #include "src/core/iomgr/timer.h" #include "src/core/support/string.h" @@ -55,6 +56,7 @@ void grpc_iomgr_init(void) { g_shutdown = 0; gpr_mu_init(&g_mu); gpr_cv_init(&g_rcv); + grpc_exec_ctx_global_init(); grpc_timer_list_init(gpr_now(GPR_CLOCK_MONOTONIC)); g_root_object.next = g_root_object.prev = &g_root_object; g_root_object.name = "root"; @@ -133,6 +135,7 @@ void grpc_iomgr_shutdown(void) { grpc_pollset_global_shutdown(); grpc_iomgr_platform_shutdown(); + grpc_exec_ctx_global_shutdown(); gpr_mu_destroy(&g_mu); gpr_cv_destroy(&g_rcv); } diff --git a/src/core/iomgr/workqueue_posix.c b/src/core/iomgr/workqueue_posix.c index c096dbfb30..2b42e6d4fb 100644 --- a/src/core/iomgr/workqueue_posix.c +++ b/src/core/iomgr/workqueue_posix.c @@ -107,7 +107,7 @@ void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { if (grpc_closure_list_empty(workqueue->closure_list)) { grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); } - grpc_closure_list_move(&exec_ctx->closure_list, &workqueue->closure_list); + grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); gpr_mu_unlock(&workqueue->mu); } @@ -123,7 +123,7 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, bool success) { gpr_free(workqueue); } else { gpr_mu_lock(&workqueue->mu); - grpc_closure_list_move(&workqueue->closure_list, &exec_ctx->closure_list); + grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); gpr_mu_unlock(&workqueue->mu); grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json index cbb8ec57b6..47ce7862fd 100644 --- a/tools/run_tests/configs.json +++ b/tools/run_tests/configs.json @@ -63,5 +63,8 @@ }, { "config": "mutrace" + }, + { + "config": "esan" } ] -- cgit v1.2.3 From d93aa14fd0c648905d1896306dfe204c48ada0d4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 28 Feb 2016 20:56:13 -0800 Subject: It seems saner to base this on TSAN --- Makefile | 13 ++++++++----- build.yaml | 12 +++++++++++- tools/run_tests/configs.json | 6 +++++- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 5d2f07145f..8b42ac7065 100644 --- a/Makefile +++ b/Makefile @@ -210,12 +210,15 @@ LDFLAGS_mutrace = -rdynamic DEFINES_mutrace = _DEBUG DEBUG VALID_CONFIG_esan = 1 -CC_esan = $(DEFAULT_CC) -CXX_esan = $(DEFAULT_CXX) -LD_esan = $(DEFAULT_CC) -LDXX_esan = $(DEFAULT_CXX) -CPPFLAGS_esan = -O0 +REQUIRE_CUSTOM_LIBRARIES_esan = 1 +CC_esan = clang +CXX_esan = clang++ +LD_esan = clang +LDXX_esan = clang++ +CPPFLAGS_esan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_esan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) DEFINES_esan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER +DEFINES_esan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 diff --git a/build.yaml b/build.yaml index c025b250e9..81fcf4f6a8 100644 --- a/build.yaml +++ b/build.yaml @@ -2725,8 +2725,18 @@ configs: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG esan: - CPPFLAGS: -O0 + CC: clang + CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument + -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS + CXX: clang++ DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER + LD: clang + LDFLAGS: -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) + LDXX: clang++ + compile_the_world: true + test_environ: + TSAN_OPTIONS: suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1 + timeout_multiplier: 5 gcov: CC: gcc CPPFLAGS: -O0 -fprofile-arcs -ftest-coverage -Wno-return-type diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json index 47ce7862fd..cd5f99908e 100644 --- a/tools/run_tests/configs.json +++ b/tools/run_tests/configs.json @@ -65,6 +65,10 @@ "config": "mutrace" }, { - "config": "esan" + "config": "esan", + "environ": { + "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" + }, + "timeout_multiplier": 5 } ] -- cgit v1.2.3 From 3af3f743c32af30adac4fbae780ee63a2af9a489 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 28 Feb 2016 21:53:13 -0800 Subject: Fixes to things --- Makefile | 147 ++++++++++++++++++++++++------------------- build.yaml | 19 +++++- src/core/iomgr/exec_ctx.c | 11 ++-- src/core/iomgr/exec_ctx.h | 3 +- test/core/util/port_posix.c | 19 +++--- tools/run_tests/configs.json | 57 ++++++++++------- 6 files changed, 151 insertions(+), 105 deletions(-) diff --git a/Makefile b/Makefile index 8b42ac7065..78257f023f 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,46 @@ LDXX_opt = $(DEFAULT_CXX) CPPFLAGS_opt = -O2 DEFINES_opt = NDEBUG +VALID_CONFIG_dbg = 1 +CC_dbg = $(DEFAULT_CC) +CXX_dbg = $(DEFAULT_CXX) +LD_dbg = $(DEFAULT_CC) +LDXX_dbg = $(DEFAULT_CXX) +CPPFLAGS_dbg = -O0 +DEFINES_dbg = _DEBUG DEBUG + +VALID_CONFIG_easan = 1 +REQUIRE_CUSTOM_LIBRARIES_easan = 1 +CC_easan = clang +CXX_easan = clang++ +LD_easan = clang +LDXX_easan = clang++ +CPPFLAGS_easan = -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_easan = -fsanitize=address +DEFINES_easan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER +DEFINES_easan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3 + +VALID_CONFIG_asan = 1 +REQUIRE_CUSTOM_LIBRARIES_asan = 1 +CC_asan = clang +CXX_asan = clang++ +LD_asan = clang +LDXX_asan = clang++ +CPPFLAGS_asan = -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan = -fsanitize=address +DEFINES_asan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3 + +VALID_CONFIG_msan = 1 +REQUIRE_CUSTOM_LIBRARIES_msan = 1 +CC_msan = clang +CXX_msan = clang++ +LD_msan = clang +LDXX_msan = clang++ +CPPFLAGS_msan = -O0 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +DEFINES_msan = NDEBUG +DEFINES_msan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=4 + VALID_CONFIG_basicprof = 1 CC_basicprof = $(DEFAULT_CC) CXX_basicprof = $(DEFAULT_CXX) @@ -123,6 +163,14 @@ CPPFLAGS_asan-noleaks = -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unus LDFLAGS_asan-noleaks = -fsanitize=address DEFINES_asan-noleaks += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3 +VALID_CONFIG_edbg = 1 +CC_edbg = $(DEFAULT_CC) +CXX_edbg = $(DEFAULT_CXX) +LD_edbg = $(DEFAULT_CC) +LDXX_edbg = $(DEFAULT_CXX) +CPPFLAGS_edbg = -O0 +DEFINES_edbg = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER + VALID_CONFIG_ubsan = 1 REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 CC_ubsan = clang @@ -134,13 +182,15 @@ LDFLAGS_ubsan = -fsanitize=undefined DEFINES_ubsan = NDEBUG DEFINES_ubsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=1.5 -VALID_CONFIG_dbg = 1 -CC_dbg = $(DEFAULT_CC) -CXX_dbg = $(DEFAULT_CXX) -LD_dbg = $(DEFAULT_CC) -LDXX_dbg = $(DEFAULT_CXX) -CPPFLAGS_dbg = -O0 -DEFINES_dbg = _DEBUG DEBUG +VALID_CONFIG_tsan = 1 +REQUIRE_CUSTOM_LIBRARIES_tsan = 1 +CC_tsan = clang +CXX_tsan = clang++ +LD_tsan = clang +LDXX_tsan = clang++ +CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_tsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_stapprof = 1 CC_stapprof = $(DEFAULT_CC) @@ -150,14 +200,14 @@ LDXX_stapprof = $(DEFAULT_CXX) CPPFLAGS_stapprof = -O2 -DGRPC_STAP_PROFILER DEFINES_stapprof = NDEBUG -VALID_CONFIG_gcov = 1 -CC_gcov = gcc -CXX_gcov = g++ -LD_gcov = gcc -LDXX_gcov = g++ -CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type -LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic -DEFINES_gcov = _DEBUG DEBUG GPR_GCOV +VALID_CONFIG_mutrace = 1 +CC_mutrace = $(DEFAULT_CC) +CXX_mutrace = $(DEFAULT_CXX) +LD_mutrace = $(DEFAULT_CC) +LDXX_mutrace = $(DEFAULT_CXX) +CPPFLAGS_mutrace = -O0 +LDFLAGS_mutrace = -rdynamic +DEFINES_mutrace = _DEBUG DEBUG VALID_CONFIG_memcheck = 1 CC_memcheck = $(DEFAULT_CC) @@ -169,56 +219,25 @@ LDFLAGS_memcheck = -rdynamic DEFINES_memcheck = _DEBUG DEBUG DEFINES_memcheck += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 -VALID_CONFIG_asan = 1 -REQUIRE_CUSTOM_LIBRARIES_asan = 1 -CC_asan = clang -CXX_asan = clang++ -LD_asan = clang -LDXX_asan = clang++ -CPPFLAGS_asan = -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_asan = -fsanitize=address -DEFINES_asan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3 - -VALID_CONFIG_tsan = 1 -REQUIRE_CUSTOM_LIBRARIES_tsan = 1 -CC_tsan = clang -CXX_tsan = clang++ -LD_tsan = clang -LDXX_tsan = clang++ -CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_tsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) -DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 +VALID_CONFIG_etsan = 1 +REQUIRE_CUSTOM_LIBRARIES_etsan = 1 +CC_etsan = clang +CXX_etsan = clang++ +LD_etsan = clang +LDXX_etsan = clang++ +CPPFLAGS_etsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_etsan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +DEFINES_etsan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER +DEFINES_etsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 -VALID_CONFIG_msan = 1 -REQUIRE_CUSTOM_LIBRARIES_msan = 1 -CC_msan = clang -CXX_msan = clang++ -LD_msan = clang -LDXX_msan = clang++ -CPPFLAGS_msan = -O0 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) -DEFINES_msan = NDEBUG -DEFINES_msan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=4 - -VALID_CONFIG_mutrace = 1 -CC_mutrace = $(DEFAULT_CC) -CXX_mutrace = $(DEFAULT_CXX) -LD_mutrace = $(DEFAULT_CC) -LDXX_mutrace = $(DEFAULT_CXX) -CPPFLAGS_mutrace = -O0 -LDFLAGS_mutrace = -rdynamic -DEFINES_mutrace = _DEBUG DEBUG - -VALID_CONFIG_esan = 1 -REQUIRE_CUSTOM_LIBRARIES_esan = 1 -CC_esan = clang -CXX_esan = clang++ -LD_esan = clang -LDXX_esan = clang++ -CPPFLAGS_esan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_esan = -fsanitize=thread -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) -DEFINES_esan = _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER -DEFINES_esan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 +VALID_CONFIG_gcov = 1 +CC_gcov = gcc +CXX_gcov = g++ +LD_gcov = gcc +LDXX_gcov = g++ +CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type +LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic +DEFINES_gcov = _DEBUG DEBUG GPR_GCOV diff --git a/build.yaml b/build.yaml index 81fcf4f6a8..d142332472 100644 --- a/build.yaml +++ b/build.yaml @@ -2724,7 +2724,24 @@ configs: dbg: CPPFLAGS: -O0 DEFINES: _DEBUG DEBUG - esan: + easan: + CC: clang + CPPFLAGS: -O0 -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument + -DGPR_NO_DIRECT_SYSCALLS + CXX: clang++ + DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER + LD: clang + LDFLAGS: -fsanitize=address + LDXX: clang++ + compile_the_world: true + test_environ: + ASAN_OPTIONS: detect_leaks=1:color=always + LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1 + timeout_multiplier: 3 + edbg: + CPPFLAGS: -O0 + DEFINES: _DEBUG DEBUG GRPC_EXECUTION_CONTEXT_SANITIZER + etsan: CC: clang CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS diff --git a/src/core/iomgr/exec_ctx.c b/src/core/iomgr/exec_ctx.c index abcdd2fa0a..893fe4515c 100644 --- a/src/core/iomgr/exec_ctx.c +++ b/src/core/iomgr/exec_ctx.c @@ -105,17 +105,15 @@ static void start_closure(grpc_closure *closure) { gpr_thd_new(&id, run_closure, closure, NULL); } -bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { - return false; -} +bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { return false; } -void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { -} +void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) {} void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, bool success, grpc_workqueue *offload_target_or_null) { GPR_ASSERT(offload_target_or_null == NULL); + if (closure == NULL) return; closure->final_data = success; start_closure(closure); } @@ -123,7 +121,8 @@ void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, grpc_closure_list *list, grpc_workqueue *offload_target_or_null) { - GPR_ASSERT(offload_target_or_null == NULL); + GPR_ASSERT(offload_target_or_null == NULL); + if (list == NULL) return; grpc_closure *p = list->head; while (p) { grpc_closure *start = p; diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index 3403a978ec..b7388657ed 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -69,7 +69,8 @@ struct grpc_exec_ctx { { GRPC_CLOSURE_LIST_INIT } #else struct grpc_exec_ctx {}; -#define GRPC_EXEC_CTX_INIT {} +#define GRPC_EXEC_CTX_INIT \ + {} #endif /** Flush any work that has been enqueued onto this grpc_exec_ctx. diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index ba382d242a..c4bd00c1ba 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -77,6 +77,7 @@ typedef struct freereq { static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, bool success) { grpc_pollset_destroy(p); + gpr_free(p); grpc_shutdown(); } @@ -95,7 +96,7 @@ static void free_port_using_server(char *server, int port) { freereq pr; char *path; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_closure shutdown_closure; + grpc_closure *shutdown_closure; grpc_init(); @@ -104,8 +105,8 @@ static void free_port_using_server(char *server, int port) { pr.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pr.pollset, &pr.mu); - grpc_closure_init(&shutdown_closure, destroy_pollset_and_shutdown, - pr.pollset); + shutdown_closure = + grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); req.host = server; gpr_asprintf(&path, "/drop/%d", port); @@ -126,9 +127,8 @@ static void free_port_using_server(char *server, int port) { grpc_httpcli_context_destroy(&context); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, &shutdown_closure); + grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); - gpr_free(pr.pollset); gpr_free(path); } @@ -262,7 +262,7 @@ static int pick_port_using_server(char *server) { grpc_httpcli_request req; portreq pr; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_closure shutdown_closure; + grpc_closure *shutdown_closure; grpc_init(); @@ -270,8 +270,8 @@ static int pick_port_using_server(char *server) { memset(&req, 0, sizeof(req)); pr.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pr.pollset, &pr.mu); - grpc_closure_init(&shutdown_closure, destroy_pollset_and_shutdown, - pr.pollset); + shutdown_closure = + grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); pr.port = -1; pr.server = server; pr.ctx = &context; @@ -294,9 +294,8 @@ static int pick_port_using_server(char *server) { gpr_mu_unlock(pr.mu); grpc_httpcli_context_destroy(&context); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, &shutdown_closure); + grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); - gpr_free(pr.pollset); return pr.port; } diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json index cd5f99908e..a858170d87 100644 --- a/tools/run_tests/configs.json +++ b/tools/run_tests/configs.json @@ -2,6 +2,29 @@ { "config": "opt" }, + { + "config": "dbg" + }, + { + "config": "easan", + "environ": { + "ASAN_OPTIONS": "detect_leaks=1:color=always", + "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" + }, + "timeout_multiplier": 3 + }, + { + "config": "asan", + "environ": { + "ASAN_OPTIONS": "detect_leaks=1:color=always", + "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" + }, + "timeout_multiplier": 3 + }, + { + "config": "msan", + "timeout_multiplier": 4 + }, { "config": "basicprof" }, @@ -20,18 +43,25 @@ }, "timeout_multiplier": 3 }, + { + "config": "edbg" + }, { "config": "ubsan", "timeout_multiplier": 1.5 }, { - "config": "dbg" + "config": "tsan", + "environ": { + "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" + }, + "timeout_multiplier": 5 }, { "config": "stapprof" }, { - "config": "gcov" + "config": "mutrace" }, { "config": "memcheck", @@ -43,32 +73,13 @@ ] }, { - "config": "asan", - "environ": { - "ASAN_OPTIONS": "detect_leaks=1:color=always", - "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" - }, - "timeout_multiplier": 3 - }, - { - "config": "tsan", + "config": "etsan", "environ": { "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" }, "timeout_multiplier": 5 }, { - "config": "msan", - "timeout_multiplier": 4 - }, - { - "config": "mutrace" - }, - { - "config": "esan", - "environ": { - "TSAN_OPTIONS": "suppressions=tools/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1" - }, - "timeout_multiplier": 5 + "config": "gcov" } ] -- cgit v1.2.3 From b929d7667eb3a18526fe2d00de7d3103f384f1fa Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 28 Feb 2016 23:12:36 -0800 Subject: C++ fix --- src/core/iomgr/exec_ctx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index b7388657ed..ea09188c8f 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -68,7 +68,7 @@ struct grpc_exec_ctx { #define GRPC_EXEC_CTX_INIT \ { GRPC_CLOSURE_LIST_INIT } #else -struct grpc_exec_ctx {}; +struct grpc_exec_ctx { int unused; }; #define GRPC_EXEC_CTX_INIT \ {} #endif -- cgit v1.2.3 From aa1c3392091c6cb9930067e005e5d19814a0cb76 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Mar 2016 21:25:05 -0800 Subject: fix compile --- src/core/iomgr/exec_ctx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index ea09188c8f..8a2e5d5f6a 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -70,7 +70,7 @@ struct grpc_exec_ctx { #else struct grpc_exec_ctx { int unused; }; #define GRPC_EXEC_CTX_INIT \ - {} + {0} #endif /** Flush any work that has been enqueued onto this grpc_exec_ctx. -- cgit v1.2.3 From 92bab124695f64588c84884511e32ef7d55c5c42 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 1 Mar 2016 23:35:35 -0800 Subject: clang-format --- src/core/iomgr/exec_ctx.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/iomgr/exec_ctx.h b/src/core/iomgr/exec_ctx.h index 8a2e5d5f6a..1b627a5dcf 100644 --- a/src/core/iomgr/exec_ctx.h +++ b/src/core/iomgr/exec_ctx.h @@ -68,9 +68,11 @@ struct grpc_exec_ctx { #define GRPC_EXEC_CTX_INIT \ { GRPC_CLOSURE_LIST_INIT } #else -struct grpc_exec_ctx { int unused; }; +struct grpc_exec_ctx { + int unused; +}; #define GRPC_EXEC_CTX_INIT \ - {0} + { 0 } #endif /** Flush any work that has been enqueued onto this grpc_exec_ctx. -- cgit v1.2.3 From f588aeb1e2033bc1421cd1dd1687f05ac7d49e64 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Mar 2016 20:33:28 -0800 Subject: introduced workaround for proto_utils --- BUILD | 2 + Makefile | 2 + build.yaml | 1 + include/grpc++/impl/codegen/proto_utils.h | 56 ++++++++++++++++++---- src/cpp/proto/proto_serializer.cc | 41 ++++++++++++++++ src/cpp/proto/proto_utils.cc | 10 ++-- tools/doxygen/Doxyfile.c++.internal | 1 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 2 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 ++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 2 + .../grpc++_unsecure.vcxproj.filters | 3 ++ 12 files changed, 110 insertions(+), 15 deletions(-) create mode 100644 src/cpp/proto/proto_serializer.cc diff --git a/BUILD b/BUILD index 0e9f37a0e3..a9bab36e93 100644 --- a/BUILD +++ b/BUILD @@ -822,6 +822,7 @@ cc_library( "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_serializer.cc", "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", @@ -945,6 +946,7 @@ cc_library( "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_serializer.cc", "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", diff --git a/Makefile b/Makefile index 5be0d146af..e77c384cd3 100644 --- a/Makefile +++ b/Makefile @@ -2994,6 +2994,7 @@ LIBGRPC++_SRC = \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ src/cpp/common/rpc_method.cc \ + src/cpp/proto/proto_serializer.cc \ src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ @@ -3274,6 +3275,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ src/cpp/common/rpc_method.cc \ + src/cpp/proto/proto_serializer.cc \ src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ diff --git a/build.yaml b/build.yaml index a277539a05..eb1031e315 100644 --- a/build.yaml +++ b/build.yaml @@ -188,6 +188,7 @@ filegroups: - src/cpp/common/channel_arguments.cc - src/cpp/common/completion_queue.cc - src/cpp/common/rpc_method.cc + - src/cpp/proto/proto_serializer.cc - src/cpp/proto/proto_utils.cc - src/cpp/server/async_generic_service.cc - src/cpp/server/create_default_thread_pool.cc diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index ce177104e0..489293d25b 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -37,21 +37,52 @@ #include #include +#include #include #include #include namespace grpc { -// Serialize the msg into a buffer created inside the function. The caller -// should destroy the returned buffer when done with it. If serialization fails, -// false is returned and buffer is left unchanged. -Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer); +class ProtoSerializerInterface { + public: + // Serialize the msg into a buffer created inside the function. The caller + // should destroy the returned buffer when done with it. If serialization + // fails, + // false is returned and buffer is left unchanged. + virtual Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** buffer) = 0; + + // The caller keeps ownership of buffer and msg. + virtual Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) = 0; +}; + +// TODO(dgq): This is a temporary fix to work around codegen issues related to +// a certain sharp-sounding build system. Its purpose is to hold a polymorphic +// proto serializer/deserializer instance. It's initialized as part of +// src/cpp/proto/proto_serializer.cc. +// +// This global variable plus all related code (ProtoSerializerInteface, +// ProtoSerializer) will be removed in the future. +extern ProtoSerializerInterface* g_proto_serializer; + +class ProtoSerializer : public ProtoSerializerInterface { + public: + // Serialize the msg into a buffer created inside the function. The caller + // should destroy the returned buffer when done with it. If serialization + // fails, + // false is returned and buffer is left unchanged. + Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** buffer) override; + + // The caller keeps ownership of buffer and msg. + Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) override; +}; -// The caller keeps ownership of buffer and msg. -Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, - int max_message_size); template class SerializationTraitsSerializeProto(msg, buffer); } static Status Deserialize(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { - auto status = DeserializeProto(buffer, msg, max_message_size); + GPR_ASSERT(g_proto_serializer != nullptr && + "No ProtoSerializer instance registered. Make sure grpc++ is being initialized."); + auto status = + g_proto_serializer->DeserializeProto(buffer, msg, max_message_size); grpc_byte_buffer_destroy(buffer); return status; } diff --git a/src/cpp/proto/proto_serializer.cc b/src/cpp/proto/proto_serializer.cc new file mode 100644 index 0000000000..4e46e989aa --- /dev/null +++ b/src/cpp/proto/proto_serializer.cc @@ -0,0 +1,41 @@ +/* + * + * 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. + * + */ + +// TODO(dgq): This file is part of a temporary fix to work around codegen issues related to +// a certain sharp-sounding build system. +// This whole file will be removed in the future. + +#include + +static grpc::ProtoSerializer proto_serializer; +grpc::ProtoSerializerInterface* grpc::g_proto_serializer = &proto_serializer; diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index 79e7bf1801..aca646021f 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.cc @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -164,8 +163,8 @@ class GrpcBufferReader GRPC_FINAL namespace grpc { -Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) { +Status ProtoSerializer::SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) { GPR_TIMER_SCOPE("SerializeProto", 0); int byte_size = msg.ByteSize(); if (byte_size <= kMaxBufferLength) { @@ -183,8 +182,9 @@ Status SerializeProto(const grpc::protobuf::Message& msg, } } -Status DeserializeProto(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, - int max_message_size) { +Status ProtoSerializer::DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) { GPR_TIMER_SCOPE("DeserializeProto", 0); if (!buffer) { return Status(StatusCode::INTERNAL, "No payload"); diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index a285310847..bb4058fae0 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -858,6 +858,7 @@ src/cpp/common/call.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ src/cpp/common/rpc_method.cc \ +src/cpp/proto/proto_serializer.cc \ src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 0c7a6c7b5f..65666e33f1 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5051,6 +5051,7 @@ "src/cpp/common/secure_auth_context.h", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", + "src/cpp/proto/proto_serializer.cc", "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", @@ -5305,6 +5306,7 @@ "src/cpp/common/create_auth_context.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/rpc_method.cc", + "src/cpp/proto/proto_serializer.cc", "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 0b8c345196..f55e94f120 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -377,6 +377,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 0f3dccf17c..ca4bed0793 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -52,6 +52,9 @@ src\cpp\common + + src\cpp\proto + src\cpp\proto diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 2dcadbaec0..60af981479 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -364,6 +364,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 3572c651b6..f2982e944d 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -37,6 +37,9 @@ src\cpp\common + + src\cpp\proto + src\cpp\proto -- cgit v1.2.3 From 94c80d838963b634ff8c1a81e89a661e7f07faaa Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Mar 2016 20:35:07 -0800 Subject: copyrights --- src/cpp/proto/proto_utils.cc | 2 +- test/cpp/interop/reconnect_interop_client.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc index aca646021f..a95a290f67 100644 --- a/src/cpp/proto/proto_utils.cc +++ b/src/cpp/proto/proto_utils.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 diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index 1f6b352db1..79a60cc860 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.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 -- cgit v1.2.3 From c4f4f7ede962358c2216123ca44b7a9616f53d71 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Mar 2016 20:37:24 -0800 Subject: clang-format --- include/grpc++/impl/codegen/proto_utils.h | 13 +++++++------ src/cpp/proto/proto_serializer.cc | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 489293d25b..05321619ac 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -75,15 +75,14 @@ class ProtoSerializer : public ProtoSerializerInterface { // fails, // false is returned and buffer is left unchanged. Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer) override; + grpc_byte_buffer** buffer) override; // The caller keeps ownership of buffer and msg. Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) override; + grpc::protobuf::Message* msg, + int max_message_size) override; }; - template class SerializationTraits::value>::type> { @@ -92,14 +91,16 @@ class SerializationTraitsSerializeProto(msg, buffer); } static Status Deserialize(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { GPR_ASSERT(g_proto_serializer != nullptr && - "No ProtoSerializer instance registered. Make sure grpc++ is being initialized."); + "No ProtoSerializer instance registered. Make sure grpc++ is " + "being initialized."); auto status = g_proto_serializer->DeserializeProto(buffer, msg, max_message_size); grpc_byte_buffer_destroy(buffer); diff --git a/src/cpp/proto/proto_serializer.cc b/src/cpp/proto/proto_serializer.cc index 4e46e989aa..5100141dc5 100644 --- a/src/cpp/proto/proto_serializer.cc +++ b/src/cpp/proto/proto_serializer.cc @@ -31,7 +31,8 @@ * */ -// TODO(dgq): This file is part of a temporary fix to work around codegen issues related to +// TODO(dgq): This file is part of a temporary fix to work around codegen issues +// related to // a certain sharp-sounding build system. // This whole file will be removed in the future. -- cgit v1.2.3 From eef5c01cf48df88e5117dc165422bbb976905060 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Mar 2016 20:38:49 -0800 Subject: clang-format --- test/cpp/interop/reconnect_interop_server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index 785f9c7ad5..41cff430ae 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -30,7 +30,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - + // Test description at doc/connection-backoff-interop-test-description.md #include -- cgit v1.2.3 From 7f7181ffc5605de2dd571b8aabd51f5b04058137 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 2 Mar 2016 20:42:16 -0800 Subject: fix comments --- include/grpc++/impl/codegen/proto_utils.h | 7 +++---- src/cpp/proto/proto_serializer.cc | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 05321619ac..c06fc5d22b 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -59,10 +59,9 @@ class ProtoSerializerInterface { int max_message_size) = 0; }; -// TODO(dgq): This is a temporary fix to work around codegen issues related to -// a certain sharp-sounding build system. Its purpose is to hold a polymorphic -// proto serializer/deserializer instance. It's initialized as part of -// src/cpp/proto/proto_serializer.cc. +// TODO(dgq): This is a temporary fix to work around codegen issues. Its purpose +// is to hold a polymorphic proto serializer/deserializer instance. It's +// initialized as part of src/cpp/proto/proto_serializer.cc. // // This global variable plus all related code (ProtoSerializerInteface, // ProtoSerializer) will be removed in the future. diff --git a/src/cpp/proto/proto_serializer.cc b/src/cpp/proto/proto_serializer.cc index 5100141dc5..3591417172 100644 --- a/src/cpp/proto/proto_serializer.cc +++ b/src/cpp/proto/proto_serializer.cc @@ -31,9 +31,9 @@ * */ -// TODO(dgq): This file is part of a temporary fix to work around codegen issues -// related to -// a certain sharp-sounding build system. +// TODO(dgq): This file is part of a temporary fix to work around codegen +// issues. +// // This whole file will be removed in the future. #include -- cgit v1.2.3 From b07938fa22e5b70d936134e771a47a61e687cdbd Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 6 Mar 2016 20:07:30 -0800 Subject: added missing initializer for global proto_serializer holder to codegen lib --- Makefile | 1 + build.yaml | 3 +- include/grpc++/impl/codegen/proto_serializer.cc | 41 ++++++++++++++++++++++ src/cpp/proto/proto_serializer.cc | 2 +- tools/run_tests/sources_and_headers.json | 1 + .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 2 +- .../grpc++_codegen_lib.vcxproj.filters | 5 +++ 7 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 include/grpc++/impl/codegen/proto_serializer.cc diff --git a/Makefile b/Makefile index 4f43625baa..073dd80132 100644 --- a/Makefile +++ b/Makefile @@ -3153,6 +3153,7 @@ endif LIBGRPC++_CODEGEN_LIB_SRC = \ + include/grpc++/impl/codegen/proto_serializer.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ diff --git a/build.yaml b/build.yaml index 9c946a81ac..40fdc30feb 100644 --- a/build.yaml +++ b/build.yaml @@ -748,7 +748,8 @@ libs: - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h headers: [] - src: [] + src: + - include/grpc++/impl/codegen/proto_serializer.cc deps: - grpc_codegen_lib filegroups: diff --git a/include/grpc++/impl/codegen/proto_serializer.cc b/include/grpc++/impl/codegen/proto_serializer.cc new file mode 100644 index 0000000000..456567e080 --- /dev/null +++ b/include/grpc++/impl/codegen/proto_serializer.cc @@ -0,0 +1,41 @@ +/* + * + * 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. + * + */ + +// TODO(dgq): This file is part of a temporary fix to work around codegen +// issues. +// +// This whole file will be removed in the future. + +#include + +grpc::ProtoSerializerInterface* grpc::g_proto_serializer = nullptr; diff --git a/src/cpp/proto/proto_serializer.cc b/src/cpp/proto/proto_serializer.cc index 3591417172..d5ed138561 100644 --- a/src/cpp/proto/proto_serializer.cc +++ b/src/cpp/proto/proto_serializer.cc @@ -36,7 +36,7 @@ // // This whole file will be removed in the future. -#include +#include static grpc::ProtoSerializer proto_serializer; grpc::ProtoSerializerInterface* grpc::g_proto_serializer = &proto_serializer; diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index fd4bbdb41b..b464cae7e4 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5110,6 +5110,7 @@ "include/grpc++/impl/codegen/config_protobuf.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_serializer.cc", "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 811e0bdd18..d64afde0ce 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -193,7 +193,7 @@ - + diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index 582d88b8cc..a3e3ac8c35 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -1,5 +1,10 @@ + + + include\grpc++\impl\codegen + + include\grpc++\impl\codegen -- cgit v1.2.3 From 4ac52fa6ddc9a114a6979a09a1749ee870227e3c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sun, 6 Mar 2016 20:31:39 -0800 Subject: WIP. Added codegen_test --- Makefile | 66 ++++++ build.yaml | 13 ++ test/cpp/codegen/codegen_test.cc | 50 +++++ tools/run_tests/sources_and_headers.json | 26 +++ tools/run_tests/tests.json | 21 ++ .../vcxproj/test/codegen_test/codegen_test.vcxproj | 240 +++++++++++++++++++++ .../test/codegen_test/codegen_test.vcxproj.filters | 51 +++++ 7 files changed, 467 insertions(+) create mode 100644 test/cpp/codegen/codegen_test.cc create mode 100644 vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj create mode 100644 vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters diff --git a/Makefile b/Makefile index 073dd80132..c9bfb038e1 100644 --- a/Makefile +++ b/Makefile @@ -944,6 +944,7 @@ channel_arguments_test: $(BINDIR)/$(CONFIG)/channel_arguments_test cli_call_test: $(BINDIR)/$(CONFIG)/cli_call_test client_crash_test: $(BINDIR)/$(CONFIG)/client_crash_test client_crash_test_server: $(BINDIR)/$(CONFIG)/client_crash_test_server +codegen_test: $(BINDIR)/$(CONFIG)/codegen_test credentials_test: $(BINDIR)/$(CONFIG)/credentials_test cxx_byte_buffer_test: $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test cxx_slice_test: $(BINDIR)/$(CONFIG)/cxx_slice_test @@ -1294,6 +1295,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/cli_call_test \ $(BINDIR)/$(CONFIG)/client_crash_test \ $(BINDIR)/$(CONFIG)/client_crash_test_server \ + $(BINDIR)/$(CONFIG)/codegen_test \ $(BINDIR)/$(CONFIG)/credentials_test \ $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test \ $(BINDIR)/$(CONFIG)/cxx_slice_test \ @@ -1598,6 +1600,8 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/cli_call_test || ( echo test cli_call_test failed ; exit 1 ) $(E) "[RUN] Testing client_crash_test" $(Q) $(BINDIR)/$(CONFIG)/client_crash_test || ( echo test client_crash_test failed ; exit 1 ) + $(E) "[RUN] Testing codegen_test" + $(Q) $(BINDIR)/$(CONFIG)/codegen_test || ( echo test codegen_test failed ; exit 1 ) $(E) "[RUN] Testing credentials_test" $(Q) $(BINDIR)/$(CONFIG)/credentials_test || ( echo test credentials_test failed ; exit 1 ) $(E) "[RUN] Testing cxx_byte_buffer_test" @@ -9230,6 +9234,68 @@ endif endif +CODEGEN_TEST_SRC = \ + $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc \ + test/cpp/codegen/codegen_test.cc \ + +CODEGEN_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/codegen_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/codegen_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/codegen_test: $(PROTOBUF_DEP) $(CODEGEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(CODEGEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/codegen_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/control.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/messages.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/payloads.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/perf_db.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/services.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a + +deps_codegen_test: $(CODEGEN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CODEGEN_TEST_OBJS:.o=.dep) +endif +endif +$(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test.o: $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.pb.cc $(GENDIR)/src/proto/grpc/testing/perf_db.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc + + CREDENTIALS_TEST_SRC = \ test/cpp/client/credentials_test.cc \ diff --git a/build.yaml b/build.yaml index 40fdc30feb..abe1fbb76c 100644 --- a/build.yaml +++ b/build.yaml @@ -2098,6 +2098,19 @@ targets: - grpc - gpr_test_util - gpr +- name: codegen_test + build: test + language: c++ + src: + - src/proto/grpc/testing/control.proto + - src/proto/grpc/testing/messages.proto + - src/proto/grpc/testing/payloads.proto + - src/proto/grpc/testing/perf_db.proto + - src/proto/grpc/testing/services.proto + - src/proto/grpc/testing/stats.proto + - test/cpp/codegen/codegen_test.cc + deps: + - grpc++_codegen_lib - name: credentials_test gtest: true build: test diff --git a/test/cpp/codegen/codegen_test.cc b/test/cpp/codegen/codegen_test.cc new file mode 100644 index 0000000000..23d9a5f9a0 --- /dev/null +++ b/test/cpp/codegen/codegen_test.cc @@ -0,0 +1,50 @@ +/* + * + * 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. + * + */ + +#include + +namespace grpc { +namespace { + +class CodegenTest : public ::testing::Test {}; + +TEST_F(CodegenTest, Build) { +} + +} // namespace +} // namespace grpc + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b464cae7e4..bbbe8e72a9 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1682,6 +1682,32 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "grpc++_codegen_lib" + ], + "headers": [ + "src/proto/grpc/testing/control.grpc.pb.h", + "src/proto/grpc/testing/control.pb.h", + "src/proto/grpc/testing/messages.grpc.pb.h", + "src/proto/grpc/testing/messages.pb.h", + "src/proto/grpc/testing/payloads.grpc.pb.h", + "src/proto/grpc/testing/payloads.pb.h", + "src/proto/grpc/testing/perf_db.grpc.pb.h", + "src/proto/grpc/testing/perf_db.pb.h", + "src/proto/grpc/testing/services.grpc.pb.h", + "src/proto/grpc/testing/services.pb.h", + "src/proto/grpc/testing/stats.grpc.pb.h", + "src/proto/grpc/testing/stats.pb.h" + ], + "language": "c++", + "name": "codegen_test", + "src": [ + "test/cpp/codegen/codegen_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index d91245cd06..02a63b3727 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1977,6 +1977,27 @@ "posix" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c++", + "name": "codegen_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj new file mode 100644 index 0000000000..7ba2a56133 --- /dev/null +++ b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj @@ -0,0 +1,240 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {07D92FF8-D0D1-CB1B-51D3-EBA0E5DEBDD7} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + codegen_test + static + Debug + static + Debug + + + codegen_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters new file mode 100644 index 0000000000..980cf76052 --- /dev/null +++ b/vsprojects/vcxproj/test/codegen_test/codegen_test.vcxproj.filters @@ -0,0 +1,51 @@ + + + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + src\proto\grpc\testing + + + test\cpp\codegen + + + + + + {a37f6960-8f92-51ed-9b99-d24970584bb2} + + + {dc3f4032-f0dc-f8f0-e07a-78c0f628e9f5} + + + {250aede7-067f-590b-42d7-15939da4a59d} + + + {57f4543e-acd0-a4a0-f3c3-8494e509b2b3} + + + {7337b395-7e96-f49b-0a4f-b8a70be23a57} + + + {cf9e3404-0ab9-a301-9715-728febcece23} + + + {d349ac75-02e7-cb63-92f1-1785a74c0561} + + + + -- cgit v1.2.3 From 48dec96777968e5d61add96d209b996273389b3b Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 7 Mar 2016 15:22:36 -0800 Subject: Stress test readme --- tools/README.md | 13 ++++--- tools/run_tests/stress_test/README.md | 72 +++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 tools/run_tests/stress_test/README.md diff --git a/tools/README.md b/tools/README.md index df4c6ef7d2..cb6c22dd83 100644 --- a/tools/README.md +++ b/tools/README.md @@ -1,13 +1,16 @@ -buildgen: template renderer for our build system. +buildgen: Template renderer for our build system. -distrib: scripts to distribute language-specific packages. +distrib: Scripts to distribute language-specific packages. dockerfile: Docker files to test gRPC. doxygen: gRPC C/C++ documentation generation via Doxygen. -gce: scripts to help setup testing infrastructure on GCE. +gce: Scripts to help setup testing infrastructure on GCE. -jenkins: support for running tests on Jenkins. +gcp: Helper scripts for interacting with various services on GCP (like Google +container engine, BigQuery etc) -run_tests: scripts to run gRPC tests in parallel. +jenkins: Support for running tests on Jenkins. + +run_tests: Scripts to run gRPC tests in parallel. diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md new file mode 100644 index 0000000000..9f3cae28a3 --- /dev/null +++ b/tools/run_tests/stress_test/README.md @@ -0,0 +1,72 @@ +Running Stress tests on Google Container Engine +======================================= + +### **Glossary**: +* GCP: Google Cloud Platform +* GCE: Google Compute Engine +* GKE: Google Container Engine +* GCP console: https://console.cloud.google.com + +### **Setup Instructions** +#### *On GCP:* +1. Create a GCP account (if you haven’t already) at https://cloud.google.com +2. Enable billing on Google cloud platform. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (see the '*Enable billing*' section). +3. Create a Project from the [GCP console](https://console.cloud.google.com) +4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). +5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click ‘Create Container Cluster’ and follow the instructions. +5.1. The instructions for Name/Zone/MachineType etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) +5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. +5.3. **IMPORTANT**: Before hitting the "Create" button, click on “More” link just above the "Create" button and Select "Enabled" for BigQuery , "Enabled" for Cloud Platform and "Read/Write" for Cloud User Accounts. +5.4. Create the cluster by clicking "Create" button. + +#### *On your machine* (or the machine from which stress tests on GKE are launched): +1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions at https://github.com/grpc/grpc/blob/master/INSTALL.md +2. Install Docker (https://docs.docker.com/engine/installation/) +3. Install Google Cloud SDK. Instructions [here](https://cloud.google.com/sdk/). This installs the `gcloud` tool +4. Install `kubectl`, Kubernetes command line tool using `gcloud` + `$ gcloud components update kubectl` +5. Install Google python client apis: + `‘$ sudo pip install --upgrade google-api-python-client’` + **Note**: Do `$ easy_install -U pip` if you do not have pip +6. Install the `requests` Python package if you don’t have it already. Instructions are [here](http://docs.python-requests.org/en/master/user/install/) +7. Set the `gcloud` defaults: See the instructions at https://cloud.google.com/container-engine/docs/before-you-begin under "*Set gcloud defaults*" section) +7.1. Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` + +### **Launching Stress tests** + +The stress tests are launched by the following script (path is relative to GRPC root directory) : +`tools/run_tests/stress_test/run_stress_tests_on_gke.py` + +The script has several parameters and you can find out more details by using the `--help` flag. +`$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` + +> **Example** +> `$ tools/run_tests/Stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` + +>Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. + +> Note: we currently do not have the ability to launch multiple instances of the server. This can be added very easily in future + +all `kubectl`, Kubernetes command line tool using `gcloud` + `$ gcloud components update kubectl` +5. Install Google python client apis: + `‘$ sudo pip install --upgrade google-api-python-client’` + **Note**: Do `$ easy_install -U pip` if you do not have pip +6. Install the `requests` Python package if you don’t have it already. Instructions are [here](http://docs.python-requests.org/en/master/user/install/) +7. Set the `gcloud` defaults: See the instructions at https://cloud.google.com/container-engine/docs/before-you-begin under "*Set gcloud defaults*" section) +7.1. Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` + +### **Launching Stress tests** + +The stress tests are launched by the following script (path is relative to GRPC root directory) : +`tools/run_tests/stress_test/run_stress_tests_on_gke.py` + +The script has several parameters and you can find out more details by using the `--help` flag. +`$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` + +> **Example** +> `$ tools/run_tests/Stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` + +>Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. + +> Note: we currently do not have the ability to launch multiple instances of the server. This can be added very easily in future -- cgit v1.2.3 From 6848c4e14584e55859018b30390589c418b93358 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 7 Mar 2016 17:10:57 -0800 Subject: wip. prior to cq refactoring --- BUILD | 9 +- Makefile | 12 +- build.yaml | 9 +- include/grpc++/impl/codegen/async_stream.h | 25 +- include/grpc++/impl/codegen/async_unary_call.h | 9 +- include/grpc++/impl/codegen/call.h | 74 +++- include/grpc++/impl/codegen/client_unary_call.h | 3 +- .../grpc++/impl/codegen/core_codegen_interface.h | 82 ++++ include/grpc++/impl/codegen/impl/async_stream.h | 462 +++++++++++++++++++++ .../grpc++/impl/codegen/impl/status_code_enum.h | 152 +++++++ include/grpc++/impl/codegen/impl/sync.h | 45 ++ include/grpc++/impl/codegen/method_handler_impl.h | 5 +- include/grpc++/impl/codegen/proto_serializer.cc | 41 -- include/grpc++/impl/codegen/proto_utils.h | 52 +-- include/grpc++/impl/codegen/string_ref.h | 74 +++- include/grpc++/impl/codegen/sync_stream.h | 21 +- src/cpp/codegen/core_codegen.cc | 250 +++++++++++ src/cpp/common/call.cc | 92 ---- src/cpp/proto/proto_serializer.cc | 42 -- src/cpp/proto/proto_utils.cc | 206 --------- src/cpp/util/string_ref.cc | 104 ----- tools/doxygen/Doxyfile.c++.internal | 5 +- tools/run_tests/sources_and_headers.json | 12 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 10 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 18 +- .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 3 +- .../grpc++_codegen_lib.vcxproj.filters | 8 +- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 8 - .../grpc++_unsecure.vcxproj.filters | 15 - 29 files changed, 1163 insertions(+), 685 deletions(-) create mode 100644 include/grpc++/impl/codegen/core_codegen_interface.h create mode 100644 include/grpc++/impl/codegen/impl/async_stream.h create mode 100644 include/grpc++/impl/codegen/impl/status_code_enum.h create mode 100644 include/grpc++/impl/codegen/impl/sync.h delete mode 100644 include/grpc++/impl/codegen/proto_serializer.cc create mode 100644 src/cpp/codegen/core_codegen.cc delete mode 100644 src/cpp/common/call.cc delete mode 100644 src/cpp/proto/proto_serializer.cc delete mode 100644 src/cpp/proto/proto_utils.cc delete mode 100644 src/cpp/util/string_ref.cc diff --git a/BUILD b/BUILD index 073953cac5..68ff306eca 100644 --- a/BUILD +++ b/BUILD @@ -796,6 +796,7 @@ cc_library( "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", "src/cpp/client/secure_credentials.cc", + "src/cpp/codegen/core_codegen.cc", "src/cpp/codegen/grpc_library.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/secure_auth_context.cc", @@ -809,12 +810,9 @@ cc_library( "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/call.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_serializer.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -826,7 +824,6 @@ cc_library( "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", ], hdrs = [ @@ -903,12 +900,9 @@ cc_library( "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/call.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_serializer.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -920,7 +914,6 @@ cc_library( "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", ], hdrs = [ diff --git a/Makefile b/Makefile index c9bfb038e1..f27e2c465a 100644 --- a/Makefile +++ b/Makefile @@ -3014,6 +3014,7 @@ endif LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ + src/cpp/codegen/core_codegen.cc \ src/cpp/codegen/grpc_library.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ @@ -3027,12 +3028,9 @@ LIBGRPC++_SRC = \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ - src/cpp/common/call.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ src/cpp/common/rpc_method.cc \ - src/cpp/proto/proto_serializer.cc \ - src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ src/cpp/server/dynamic_thread_pool.cc \ @@ -3044,7 +3042,6 @@ LIBGRPC++_SRC = \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ - src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ PUBLIC_HEADERS_CXX += \ @@ -3157,7 +3154,6 @@ endif LIBGRPC++_CODEGEN_LIB_SRC = \ - include/grpc++/impl/codegen/proto_serializer.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ @@ -3171,6 +3167,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/completion_queue_tag.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ include/grpc++/impl/codegen/proto_utils.h \ @@ -3357,12 +3354,9 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ - src/cpp/common/call.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ src/cpp/common/rpc_method.cc \ - src/cpp/proto/proto_serializer.cc \ - src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ src/cpp/server/dynamic_thread_pool.cc \ @@ -3374,7 +3368,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ - src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ PUBLIC_HEADERS_CXX += \ @@ -13151,6 +13144,7 @@ src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP) src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP) src/core/tsi/transport_security.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) +src/cpp/codegen/core_codegen.cc: $(OPENSSL_DEP) src/cpp/codegen/grpc_library.cc: $(OPENSSL_DEP) src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index abe1fbb76c..df64c231c1 100644 --- a/build.yaml +++ b/build.yaml @@ -184,12 +184,9 @@ filegroups: - src/cpp/client/credentials.cc - src/cpp/client/generic_stub.cc - src/cpp/client/insecure_credentials.cc - - src/cpp/common/call.cc - src/cpp/common/channel_arguments.cc - src/cpp/common/completion_queue.cc - src/cpp/common/rpc_method.cc - - src/cpp/proto/proto_serializer.cc - - src/cpp/proto/proto_utils.cc - src/cpp/server/async_generic_service.cc - src/cpp/server/create_default_thread_pool.cc - src/cpp/server/dynamic_thread_pool.cc @@ -201,7 +198,6 @@ filegroups: - src/cpp/util/byte_buffer.cc - src/cpp/util/slice.cc - src/cpp/util/status.cc - - src/cpp/util/string_ref.cc - src/cpp/util/time.cc - name: grpc_base public_headers: @@ -698,6 +694,7 @@ libs: - src/cpp/server/secure_server_credentials.h src: - src/cpp/client/secure_credentials.cc + - src/cpp/codegen/core_codegen.cc - src/cpp/codegen/grpc_library.cc - src/cpp/common/auth_property_iterator.cc - src/cpp/common/secure_auth_context.cc @@ -728,6 +725,7 @@ libs: - include/grpc++/impl/codegen/completion_queue_tag.h - include/grpc++/impl/codegen/config.h - include/grpc++/impl/codegen/config_protobuf.h + - include/grpc++/impl/codegen/core_codegen_interface.h - include/grpc++/impl/codegen/grpc_library.h - include/grpc++/impl/codegen/method_handler_impl.h - include/grpc++/impl/codegen/proto_utils.h @@ -748,8 +746,7 @@ libs: - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h headers: [] - src: - - include/grpc++/impl/codegen/proto_serializer.cc + src: [] deps: - grpc_codegen_lib filegroups: diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index b0410485f8..8b6047a4a3 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -35,6 +35,7 @@ #define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H #include +#include #include #include #include @@ -109,13 +110,13 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface { init_ops_.set_output_tag(tag); init_ops_.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(init_ops_.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok()); init_ops_.ClientSendClose(); call_.PerformOps(&init_ops_); } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -177,7 +178,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -187,7 +188,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_ops_.set_output_tag(tag); // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -243,7 +244,7 @@ class ClientAsyncReaderWriter GRPC_FINAL } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -262,7 +263,7 @@ class ClientAsyncReaderWriter GRPC_FINAL void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_ops_.set_output_tag(tag); // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -300,7 +301,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -331,7 +332,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, } void FinishWithError(const Status& status, void* tag) { - GPR_ASSERT(!status.ok()); + GPR_CODEGEN_ASSERT(!status.ok()); finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -360,7 +361,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -375,7 +376,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, ctx_->sent_initial_metadata_ = true; } // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -409,7 +410,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -430,7 +431,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, ctx_->sent_initial_metadata_ = true; } // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index f3c75dc3b1..9c6dbd5484 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -45,6 +45,7 @@ namespace grpc { class CompletionQueue; +extern CoreCodegenInterface* g_core_codegen_interface; template class ClientAsyncResponseReaderInterface { @@ -68,13 +69,13 @@ class ClientAsyncResponseReader GRPC_FINAL collection_->init_buf_.SetCollection(collection_); collection_->init_buf_.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(collection_->init_buf_.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(collection_->init_buf_.SendMessage(request).ok()); collection_->init_buf_.ClientSendClose(); call_.PerformOps(&collection_->init_buf_); } void ReadInitialMetadata(void* tag) { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); collection_->meta_buf_.SetCollection(collection_); collection_->meta_buf_.set_output_tag(tag); @@ -116,7 +117,7 @@ class ServerAsyncResponseWriter GRPC_FINAL : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_buf_.set_output_tag(tag); meta_buf_.SendInitialMetadata(ctx_->initial_metadata_); @@ -141,7 +142,7 @@ class ServerAsyncResponseWriter GRPC_FINAL } void FinishWithError(const Status& status, void* tag) { - GPR_ASSERT(!status.ok()); + GPR_CODEGEN_ASSERT(!status.ok()); finish_buf_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_buf_.SendInitialMetadata(ctx_->initial_metadata_); diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 5e450b0d24..ec950b8ea6 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -41,12 +41,14 @@ #include #include -#include #include +#include #include -#include #include +#include +#include #include +#include struct grpc_byte_buffer; @@ -56,12 +58,39 @@ class ByteBuffer; class Call; class CallHook; class CompletionQueue; +extern CoreCodegenInterface* g_core_codegen_interface; -void FillMetadataMap( +inline void FillMetadataMap( grpc_metadata_array* arr, - std::multimap* metadata); -grpc_metadata* FillMetadataArray( - const std::multimap& metadata); + std::multimap* metadata) { + for (size_t i = 0; i < arr->count; i++) { + // TODO(yangg) handle duplicates? + metadata->insert(std::pair( + arr->metadata[i].key, grpc::string_ref(arr->metadata[i].value, + arr->metadata[i].value_length))); + } + g_core_codegen_interface->grpc_metadata_array_destroy(arr); + g_core_codegen_interface->grpc_metadata_array_init(arr); +} + +// TODO(yangg) if the map is changed before we send, the pointers will be a +// mess. Make sure it does not happen. +inline grpc_metadata* FillMetadataArray( + const std::multimap& metadata) { + if (metadata.empty()) { + return nullptr; + } + grpc_metadata* metadata_array = + (grpc_metadata*)(g_core_codegen_interface->gpr_malloc( + metadata.size() * sizeof(grpc_metadata))); + size_t i = 0; + for (auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) { + metadata_array[i].key = iter->first.c_str(); + metadata_array[i].value = iter->second.c_str(); + metadata_array[i].value_length = iter->second.size(); + } + return metadata_array; +} /// Per-message write options. class WriteOptions { @@ -170,7 +199,7 @@ class CallOpSendInitialMetadata { } void FinishOp(bool* status, int max_message_size) { if (!send_) return; - gpr_free(initial_metadata_); + g_core_codegen_interface->gpr_free(initial_metadata_); send_ = false; } @@ -204,7 +233,7 @@ class CallOpSendMessage { write_options_.Clear(); } void FinishOp(bool* status, int max_message_size) { - if (own_buf_) grpc_byte_buffer_destroy(send_buf_); + if (own_buf_) g_core_codegen_interface->grpc_byte_buffer_destroy(send_buf_); send_buf_ = nullptr; } @@ -254,7 +283,7 @@ class CallOpRecvMessage { max_message_size).ok(); } else { got_message = false; - grpc_byte_buffer_destroy(recv_buf_); + g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); } } else { got_message = false; @@ -321,7 +350,7 @@ class CallOpGenericRecvMessage { *status = deserialize_->Deserialize(recv_buf_, max_message_size).ok(); } else { got_message = false; - grpc_byte_buffer_destroy(recv_buf_); + g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); } } else { got_message = false; @@ -386,7 +415,7 @@ class CallOpServerSendStatus { void FinishOp(bool* status, int max_message_size) { if (!send_status_available_) return; - gpr_free(trailing_metadata_); + g_core_codegen_interface->gpr_free(trailing_metadata_); send_status_available_ = false; } @@ -462,7 +491,7 @@ class CallOpClientRecvStatus { *recv_status_ = Status( static_cast(status_code_), status_details_ ? grpc::string(status_details_) : grpc::string()); - gpr_free(status_details_); + g_core_codegen_interface->gpr_free(status_details_); recv_status_ = nullptr; } @@ -576,11 +605,22 @@ class SneakyCallOpSet : public CallOpSet { class Call GRPC_FINAL { public: /* call is owned by the caller */ - Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq); - Call(grpc_call* call, CallHook* call_hook_, CompletionQueue* cq, - int max_message_size); - - void PerformOps(CallOpSetInterface* ops); + Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) + : call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} + + Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq, + int max_message_size) + : call_hook_(call_hook), + cq_(cq), + call_(call), + max_message_size_(max_message_size) {} + + void PerformOps(CallOpSetInterface* ops) { + if (max_message_size_ > 0) { + ops->set_max_message_size(max_message_size_); + } + call_hook_->PerformOpsOnCall(ops, this); + } grpc_call* call() { return call_; } CompletionQueue* cq() { return cq_; } diff --git a/include/grpc++/impl/codegen/client_unary_call.h b/include/grpc++/impl/codegen/client_unary_call.h index 0134dec800..0f7c5ec90c 100644 --- a/include/grpc++/impl/codegen/client_unary_call.h +++ b/include/grpc++/impl/codegen/client_unary_call.h @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -66,7 +67,7 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, ops.ClientSendClose(); ops.ClientRecvStatus(context, &status); call.PerformOps(&ops); - GPR_ASSERT((cq.Pluck(&ops) && ops.got_message) || !status.ok()); + GPR_CODEGEN_ASSERT((cq.Pluck(&ops) && ops.got_message) || !status.ok()); return status; } diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h new file mode 100644 index 0000000000..b1b128cc4a --- /dev/null +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -0,0 +1,82 @@ +/* + * + * Copyright 2015-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. + * + */ + +/// XXX +#ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H +#define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H + +#include +#include +#include + +namespace grpc { + +class CoreCodegenInterface { + public: + virtual grpc_completion_queue* CompletionQueueCreate() = 0; + virtual grpc_event CompletionQueuePluck(grpc_completion_queue* cq, void* tag, + gpr_timespec deadline) = 0; + + // Serialize the msg into a buffer created inside the function. The caller + // should destroy the returned buffer when done with it. If serialization + // fails, + // false is returned and buffer is left unchanged. + virtual Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** buffer) = 0; + + // The caller keeps ownership of buffer and msg. + virtual Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) = 0; + + virtual void* gpr_malloc(size_t size) = 0; + virtual void gpr_free(void* p) = 0; + + virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; + virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; + virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; + + virtual void assert_fail(const char* failed_assertion) = 0; +}; + +/* XXX */ +#define GPR_CODEGEN_ASSERT(x) \ + do { \ + if (!(x)) { \ + g_core_codegen_interface->assert_fail(#x); \ + } \ + } while (0) + +} // namespace grpc + +#endif // GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h new file mode 100644 index 0000000000..b0410485f8 --- /dev/null +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -0,0 +1,462 @@ +/* + * + * Copyright 2015-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. + * + */ + +#ifndef GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H +#define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H + +#include +#include +#include +#include +#include + +namespace grpc { + +class CompletionQueue; + +/// Common interface for all client side asynchronous streaming. +class ClientAsyncStreamingInterface { + public: + virtual ~ClientAsyncStreamingInterface() {} + + /// Request notification of the reading of the initial metadata. Completion + /// will be notified by \a tag on the associated completion queue. + /// + /// \param[in] tag Tag identifying this request. + virtual void ReadInitialMetadata(void* tag) = 0; + + /// Request notification completion. + /// + /// \param[out] status To be updated with the operation status. + /// \param[in] tag Tag identifying this request. + virtual void Finish(Status* status, void* tag) = 0; +}; + +/// An interface that yields a sequence of messages of type \a R. +template +class AsyncReaderInterface { + public: + virtual ~AsyncReaderInterface() {} + + /// Read a message of type \a R into \a msg. Completion will be notified by \a + /// tag on the associated completion queue. + /// + /// \param[out] msg Where to eventually store the read message. + /// \param[in] tag The tag identifying the operation. + virtual void Read(R* msg, void* tag) = 0; +}; + +/// An interface that can be fed a sequence of messages of type \a W. +template +class AsyncWriterInterface { + public: + virtual ~AsyncWriterInterface() {} + + /// Request the writing of \a msg with identifying tag \a tag. + /// + /// Only one write may be outstanding at any given time. This means that + /// after calling Write, one must wait to receive \a tag from the completion + /// queue BEFORE calling Write again. + /// + /// \param[in] msg The message to be written. + /// \param[in] tag The tag identifying the operation. + virtual void Write(const W& msg, void* tag) = 0; +}; + +template +class ClientAsyncReaderInterface : public ClientAsyncStreamingInterface, + public AsyncReaderInterface {}; + +template +class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface { + public: + /// Create a stream and write the first request out. + template + ClientAsyncReader(ChannelInterface* channel, CompletionQueue* cq, + const RpcMethod& method, ClientContext* context, + const W& request, void* tag) + : context_(context), call_(channel->CreateCall(method, context, cq)) { + init_ops_.set_output_tag(tag); + init_ops_.SendInitialMetadata(context->send_initial_metadata_); + // TODO(ctiller): don't assert + GPR_ASSERT(init_ops_.SendMessage(request).ok()); + init_ops_.ClientSendClose(); + call_.PerformOps(&init_ops_); + } + + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_ASSERT(!context_->initial_metadata_received_); + + meta_ops_.set_output_tag(tag); + meta_ops_.RecvInitialMetadata(context_); + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + read_ops_.RecvInitialMetadata(context_); + } + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Finish(Status* status, void* tag) GRPC_OVERRIDE { + finish_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + finish_ops_.RecvInitialMetadata(context_); + } + finish_ops_.ClientRecvStatus(context_, status); + call_.PerformOps(&finish_ops_); + } + + private: + ClientContext* context_; + Call call_; + CallOpSet + init_ops_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet finish_ops_; +}; + +/// Common interface for client side asynchronous writing. +template +class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface, + public AsyncWriterInterface { + public: + /// Signal the client is done with the writes. + /// + /// \param[in] tag The tag identifying the operation. + virtual void WritesDone(void* tag) = 0; +}; + +template +class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { + public: + template + ClientAsyncWriter(ChannelInterface* channel, CompletionQueue* cq, + const RpcMethod& method, ClientContext* context, + R* response, void* tag) + : context_(context), call_(channel->CreateCall(method, context, cq)) { + finish_ops_.RecvMessage(response); + + init_ops_.set_output_tag(tag); + init_ops_.SendInitialMetadata(context->send_initial_metadata_); + call_.PerformOps(&init_ops_); + } + + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_ASSERT(!context_->initial_metadata_received_); + + meta_ops_.set_output_tag(tag); + meta_ops_.RecvInitialMetadata(context_); + call_.PerformOps(&meta_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + // TODO(ctiller): don't assert + GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void WritesDone(void* tag) GRPC_OVERRIDE { + writes_done_ops_.set_output_tag(tag); + writes_done_ops_.ClientSendClose(); + call_.PerformOps(&writes_done_ops_); + } + + void Finish(Status* status, void* tag) GRPC_OVERRIDE { + finish_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + finish_ops_.RecvInitialMetadata(context_); + } + finish_ops_.ClientRecvStatus(context_, status); + call_.PerformOps(&finish_ops_); + } + + private: + ClientContext* context_; + Call call_; + CallOpSet init_ops_; + CallOpSet meta_ops_; + CallOpSet write_ops_; + CallOpSet writes_done_ops_; + CallOpSet finish_ops_; +}; + +/// Client-side interface for asynchronous bi-directional streaming. +template +class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface, + public AsyncWriterInterface, + public AsyncReaderInterface { + public: + /// Signal the client is done with the writes. + /// + /// \param[in] tag The tag identifying the operation. + virtual void WritesDone(void* tag) = 0; +}; + +template +class ClientAsyncReaderWriter GRPC_FINAL + : public ClientAsyncReaderWriterInterface { + public: + ClientAsyncReaderWriter(ChannelInterface* channel, CompletionQueue* cq, + const RpcMethod& method, ClientContext* context, + void* tag) + : context_(context), call_(channel->CreateCall(method, context, cq)) { + init_ops_.set_output_tag(tag); + init_ops_.SendInitialMetadata(context->send_initial_metadata_); + call_.PerformOps(&init_ops_); + } + + void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_ASSERT(!context_->initial_metadata_received_); + + meta_ops_.set_output_tag(tag); + meta_ops_.RecvInitialMetadata(context_); + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + read_ops_.RecvInitialMetadata(context_); + } + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + // TODO(ctiller): don't assert + GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void WritesDone(void* tag) GRPC_OVERRIDE { + writes_done_ops_.set_output_tag(tag); + writes_done_ops_.ClientSendClose(); + call_.PerformOps(&writes_done_ops_); + } + + void Finish(Status* status, void* tag) GRPC_OVERRIDE { + finish_ops_.set_output_tag(tag); + if (!context_->initial_metadata_received_) { + finish_ops_.RecvInitialMetadata(context_); + } + finish_ops_.ClientRecvStatus(context_, status); + call_.PerformOps(&finish_ops_); + } + + private: + ClientContext* context_; + Call call_; + CallOpSet init_ops_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet write_ops_; + CallOpSet writes_done_ops_; + CallOpSet finish_ops_; +}; + +template +class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncReaderInterface { + public: + explicit ServerAsyncReader(ServerContext* ctx) + : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} + + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_ASSERT(!ctx_->sent_initial_metadata_); + + meta_ops_.set_output_tag(tag); + meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Finish(const W& msg, const Status& status, void* tag) { + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + // The response is dropped if the status is not OK. + if (status.ok()) { + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, + finish_ops_.SendMessage(msg)); + } else { + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + } + call_.PerformOps(&finish_ops_); + } + + void FinishWithError(const Status& status, void* tag) { + GPR_ASSERT(!status.ok()); + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + call_.PerformOps(&finish_ops_); + } + + private: + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } + + Call call_; + ServerContext* ctx_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet finish_ops_; +}; + +template +class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncWriterInterface { + public: + explicit ServerAsyncWriter(ServerContext* ctx) + : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} + + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_ASSERT(!ctx_->sent_initial_metadata_); + + meta_ops_.set_output_tag(tag); + meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_.PerformOps(&meta_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + write_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + // TODO(ctiller): don't assert + GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void Finish(const Status& status, void* tag) { + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + call_.PerformOps(&finish_ops_); + } + + private: + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } + + Call call_; + ServerContext* ctx_; + CallOpSet meta_ops_; + CallOpSet write_ops_; + CallOpSet finish_ops_; +}; + +/// Server-side interface for asynchronous bi-directional streaming. +template +class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, + public AsyncWriterInterface, + public AsyncReaderInterface { + public: + explicit ServerAsyncReaderWriter(ServerContext* ctx) + : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} + + void SendInitialMetadata(void* tag) GRPC_OVERRIDE { + GPR_ASSERT(!ctx_->sent_initial_metadata_); + + meta_ops_.set_output_tag(tag); + meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + call_.PerformOps(&meta_ops_); + } + + void Read(R* msg, void* tag) GRPC_OVERRIDE { + read_ops_.set_output_tag(tag); + read_ops_.RecvMessage(msg); + call_.PerformOps(&read_ops_); + } + + void Write(const W& msg, void* tag) GRPC_OVERRIDE { + write_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + write_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + // TODO(ctiller): don't assert + GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + call_.PerformOps(&write_ops_); + } + + void Finish(const Status& status, void* tag) { + finish_ops_.set_output_tag(tag); + if (!ctx_->sent_initial_metadata_) { + finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); + ctx_->sent_initial_metadata_ = true; + } + finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); + call_.PerformOps(&finish_ops_); + } + + private: + friend class ::grpc::Server; + + void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } + + Call call_; + ServerContext* ctx_; + CallOpSet meta_ops_; + CallOpSet> read_ops_; + CallOpSet write_ops_; + CallOpSet finish_ops_; +}; + +} // namespace grpc + +#endif // GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H diff --git a/include/grpc++/impl/codegen/impl/status_code_enum.h b/include/grpc++/impl/codegen/impl/status_code_enum.h new file mode 100644 index 0000000000..9a90a18e2a --- /dev/null +++ b/include/grpc++/impl/codegen/impl/status_code_enum.h @@ -0,0 +1,152 @@ +/* + * + * 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. + * + */ + +#ifndef GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H +#define GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H + +namespace grpc { + +enum StatusCode { + /// Not an error; returned on success. + OK = 0, + + /// The operation was cancelled (typically by the caller). + CANCELLED = 1, + + /// Unknown error. An example of where this error may be returned is if a + /// Status value received from another address space belongs to an error-space + /// that is not known in this address space. Also errors raised by APIs that + /// do not return enough error information may be converted to this error. + UNKNOWN = 2, + + /// Client specified an invalid argument. Note that this differs from + /// FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are + /// problematic regardless of the state of the system (e.g., a malformed file + /// name). + INVALID_ARGUMENT = 3, + + /// Deadline expired before operation could complete. For operations that + /// change the state of the system, this error may be returned even if the + /// operation has completed successfully. For example, a successful response + /// from a server could have been delayed long enough for the deadline to + /// expire. + DEADLINE_EXCEEDED = 4, + + /// Some requested entity (e.g., file or directory) was not found. + NOT_FOUND = 5, + + /// Some entity that we attempted to create (e.g., file or directory) already + /// exists. + ALREADY_EXISTS = 6, + + /// The caller does not have permission to execute the specified operation. + /// PERMISSION_DENIED must not be used for rejections caused by exhausting + /// some resource (use RESOURCE_EXHAUSTED instead for those errors). + /// PERMISSION_DENIED must not be used if the caller can not be identified + /// (use UNAUTHENTICATED instead for those errors). + PERMISSION_DENIED = 7, + + /// The request does not have valid authentication credentials for the + /// operation. + UNAUTHENTICATED = 16, + + /// Some resource has been exhausted, perhaps a per-user quota, or perhaps the + /// entire file system is out of space. + RESOURCE_EXHAUSTED = 8, + + /// Operation was rejected because the system is not in a state required for + /// the operation's execution. For example, directory to be deleted may be + /// non-empty, an rmdir operation is applied to a non-directory, etc. + /// + /// A litmus test that may help a service implementor in deciding + /// between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + /// (a) Use UNAVAILABLE if the client can retry just the failing call. + /// (b) Use ABORTED if the client should retry at a higher-level + /// (e.g., restarting a read-modify-write sequence). + /// (c) Use FAILED_PRECONDITION if the client should not retry until + /// the system state has been explicitly fixed. E.g., if an "rmdir" + /// fails because the directory is non-empty, FAILED_PRECONDITION + /// should be returned since the client should not retry unless + /// they have first fixed up the directory by deleting files from it. + /// (d) Use FAILED_PRECONDITION if the client performs conditional + /// REST Get/Update/Delete on a resource and the resource on the + /// server does not match the condition. E.g., conflicting + /// read-modify-write on the same resource. + FAILED_PRECONDITION = 9, + + /// The operation was aborted, typically due to a concurrency issue like + /// sequencer check failures, transaction aborts, etc. + /// + /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, + /// and UNAVAILABLE. + ABORTED = 10, + + /// Operation was attempted past the valid range. E.g., seeking or reading + /// past end of file. + /// + /// Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed + /// if the system state changes. For example, a 32-bit file system will + /// generate INVALID_ARGUMENT if asked to read at an offset that is not in the + /// range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from + /// an offset past the current file size. + /// + /// There is a fair bit of overlap between FAILED_PRECONDITION and + /// OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) + /// when it applies so that callers who are iterating through a space can + /// easily look for an OUT_OF_RANGE error to detect when they are done. + OUT_OF_RANGE = 11, + + /// Operation is not implemented or not supported/enabled in this service. + UNIMPLEMENTED = 12, + + /// Internal errors. Means some invariants expected by underlying System has + /// been broken. If you see one of these errors, Something is very broken. + INTERNAL = 13, + + /// The service is currently unavailable. This is a most likely a transient + /// condition and may be corrected by retrying with a backoff. + /// + /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, + /// and UNAVAILABLE. + UNAVAILABLE = 14, + + /// Unrecoverable data loss or corruption. + DATA_LOSS = 15, + + /// Force users to include a default branch: + DO_NOT_USE = -1 +}; + +} // namespace grpc + +#endif // GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H diff --git a/include/grpc++/impl/codegen/impl/sync.h b/include/grpc++/impl/codegen/impl/sync.h new file mode 100644 index 0000000000..375af1543b --- /dev/null +++ b/include/grpc++/impl/codegen/impl/sync.h @@ -0,0 +1,45 @@ +/* + * + * Copyright 2015-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. + * + */ + +#ifndef GRPCXX_IMPL_CODEGEN_SYNC_H +#define GRPCXX_IMPL_CODEGEN_SYNC_H + +#include + +#ifdef GRPC_CXX0X_NO_THREAD +#include +#else +#include +#endif + +#endif // GRPCXX_IMPL_CODEGEN_SYNC_H diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 1bf9bf0549..3ecca0a406 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -34,6 +34,7 @@ #ifndef GRPCXX_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H #define GRPCXX_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H +#include #include #include @@ -58,7 +59,7 @@ class RpcMethodHandler : public MethodHandler { status = func_(service_, param.server_context, &req, &rsp); } - GPR_ASSERT(!param.server_context->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); @@ -93,7 +94,7 @@ class ClientStreamingHandler : public MethodHandler { ResponseType rsp; Status status = func_(service_, param.server_context, &reader, &rsp); - GPR_ASSERT(!param.server_context->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); diff --git a/include/grpc++/impl/codegen/proto_serializer.cc b/include/grpc++/impl/codegen/proto_serializer.cc deleted file mode 100644 index 456567e080..0000000000 --- a/include/grpc++/impl/codegen/proto_serializer.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * 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. - * - */ - -// TODO(dgq): This file is part of a temporary fix to work around codegen -// issues. -// -// This whole file will be removed in the future. - -#include - -grpc::ProtoSerializerInterface* grpc::g_proto_serializer = nullptr; diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index c06fc5d22b..8903a4412e 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -41,46 +41,11 @@ #include #include #include +#include namespace grpc { -class ProtoSerializerInterface { - public: - // Serialize the msg into a buffer created inside the function. The caller - // should destroy the returned buffer when done with it. If serialization - // fails, - // false is returned and buffer is left unchanged. - virtual Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer) = 0; - - // The caller keeps ownership of buffer and msg. - virtual Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) = 0; -}; - -// TODO(dgq): This is a temporary fix to work around codegen issues. Its purpose -// is to hold a polymorphic proto serializer/deserializer instance. It's -// initialized as part of src/cpp/proto/proto_serializer.cc. -// -// This global variable plus all related code (ProtoSerializerInteface, -// ProtoSerializer) will be removed in the future. -extern ProtoSerializerInterface* g_proto_serializer; - -class ProtoSerializer : public ProtoSerializerInterface { - public: - // Serialize the msg into a buffer created inside the function. The caller - // should destroy the returned buffer when done with it. If serialization - // fails, - // false is returned and buffer is left unchanged. - Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer) override; - - // The caller keeps ownership of buffer and msg. - Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) override; -}; +extern CoreCodegenInterface* g_core_codegen_interface; template class SerializationTraitsSerializeProto(msg, buffer); + return g_core_codegen_interface->SerializeProto(msg, buffer); } static Status Deserialize(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { - GPR_ASSERT(g_proto_serializer != nullptr && - "No ProtoSerializer instance registered. Make sure grpc++ is " - "being initialized."); - auto status = - g_proto_serializer->DeserializeProto(buffer, msg, max_message_size); - grpc_byte_buffer_destroy(buffer); - return status; + return g_core_codegen_interface->DeserializeProto(buffer, msg, max_message_size); } }; diff --git a/include/grpc++/impl/codegen/string_ref.h b/include/grpc++/impl/codegen/string_ref.h index e3af37e0c2..29d85d92dc 100644 --- a/include/grpc++/impl/codegen/string_ref.h +++ b/include/grpc++/impl/codegen/string_ref.h @@ -34,8 +34,12 @@ #ifndef GRPCXX_IMPL_CODEGEN_STRING_REF_H #define GRPCXX_IMPL_CODEGEN_STRING_REF_H -#include +#include + +#include #include +#include +#include #include @@ -56,14 +60,19 @@ class string_ref { typedef std::reverse_iterator const_reverse_iterator; // constants - const static size_t npos; + const static size_t npos = size_t(-1); // construct/copy. string_ref() : data_(nullptr), length_(0) {} string_ref(const string_ref& other) : data_(other.data_), length_(other.length_) {} - string_ref& operator=(const string_ref& rhs); - string_ref(const char* s); + string_ref& operator=(const string_ref& rhs) { + data_ = rhs.data_; + length_ = rhs.length_; + return *this; + } + + string_ref(const char* s) : data_(s), length_(strlen(s)) {} string_ref(const char* s, size_t l) : data_(s), length_(l) {} string_ref(const grpc::string& s) : data_(s.data()), length_(s.length()) {} @@ -95,13 +104,40 @@ class string_ref { const char* data() const { return data_; } // string operations - int compare(string_ref x) const; - bool starts_with(string_ref x) const; - bool ends_with(string_ref x) const; - size_t find(string_ref s) const; - size_t find(char c) const; + int compare(string_ref x) const { + size_t min_size = length_ < x.length_ ? length_ : x.length_; + int r = memcmp(data_, x.data_, min_size); + if (r < 0) return -1; + if (r > 0) return 1; + if (length_ < x.length_) return -1; + if (length_ > x.length_) return 1; + return 0; + } + + bool starts_with(string_ref x) const { + return length_ >= x.length_ && (memcmp(data_, x.data_, x.length_) == 0); + } - string_ref substr(size_t pos, size_t n = npos) const; + bool ends_with(string_ref x) const { + return length_ >= x.length_ && + (memcmp(data_ + (length_ - x.length_), x.data_, x.length_) == 0); + } + + size_t find(string_ref s) const { + auto it = std::search(cbegin(), cend(), s.cbegin(), s.cend()); + return it == cend() ? npos : std::distance(cbegin(), it); + } + + size_t find(char c) const { + auto it = std::find(cbegin(), cend(), c); + return it == cend() ? npos : std::distance(cbegin(), it); + } + + string_ref substr(size_t pos, size_t n = npos) const { + if (pos > length_) pos = length_; + if (n > (length_ - pos)) n = length_ - pos; + return string_ref(data_ + pos, n); + } private: const char* data_; @@ -109,14 +145,16 @@ class string_ref { }; // Comparison operators -bool operator==(string_ref x, string_ref y); -bool operator!=(string_ref x, string_ref y); -bool operator<(string_ref x, string_ref y); -bool operator>(string_ref x, string_ref y); -bool operator<=(string_ref x, string_ref y); -bool operator>=(string_ref x, string_ref y); - -std::ostream& operator<<(std::ostream& stream, const string_ref& string); +inline bool operator==(string_ref x, string_ref y) { return x.compare(y) == 0; } +inline bool operator!=(string_ref x, string_ref y) { return x.compare(y) != 0; } +inline bool operator<(string_ref x, string_ref y) { return x.compare(y) < 0; } +inline bool operator<=(string_ref x, string_ref y) { return x.compare(y) <= 0; } +inline bool operator>(string_ref x, string_ref y) { return x.compare(y) > 0; } +inline bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } + +inline std::ostream& operator<<(std::ostream& out, const string_ref& string) { + return out << grpc::string(string.begin(), string.end()); +} } // namespace grpc diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 9ae48bd23d..5f878469ce 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -125,14 +126,14 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface { CallOpClientSendClose> ops; ops.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(ops.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(ops.SendMessage(request).ok()); ops.ClientSendClose(); call_.PerformOps(&ops); cq_.Pluck(&ops); } void WaitForInitialMetadata() GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); CallOpSet ops; ops.RecvInitialMetadata(context_); @@ -155,7 +156,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface { Status status; ops.ClientRecvStatus(context_, &status); call_.PerformOps(&ops); - GPR_ASSERT(cq_.Pluck(&ops)); + GPR_CODEGEN_ASSERT(cq_.Pluck(&ops)); return status; } @@ -194,7 +195,7 @@ class ClientWriter : public ClientWriterInterface { } void WaitForInitialMetadata() { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); CallOpSet ops; ops.RecvInitialMetadata(context_); @@ -227,7 +228,7 @@ class ClientWriter : public ClientWriterInterface { } finish_ops_.ClientRecvStatus(context_, &status); call_.PerformOps(&finish_ops_); - GPR_ASSERT(cq_.Pluck(&finish_ops_)); + GPR_CODEGEN_ASSERT(cq_.Pluck(&finish_ops_)); return status; } @@ -271,7 +272,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface { } void WaitForInitialMetadata() GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); CallOpSet ops; ops.RecvInitialMetadata(context_); @@ -312,7 +313,7 @@ class ClientReaderWriter GRPC_FINAL : public ClientReaderWriterInterface { Status status; ops.ClientRecvStatus(context_, &status); call_.PerformOps(&ops); - GPR_ASSERT(cq_.Pluck(&ops)); + GPR_CODEGEN_ASSERT(cq_.Pluck(&ops)); return status; } @@ -328,7 +329,7 @@ class ServerReader GRPC_FINAL : public ReaderInterface { ServerReader(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(ctx_->initial_metadata_); @@ -355,7 +356,7 @@ class ServerWriter GRPC_FINAL : public WriterInterface { ServerWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(ctx_->initial_metadata_); @@ -391,7 +392,7 @@ class ServerReaderWriter GRPC_FINAL : public WriterInterface, ServerReaderWriter(Call* call, ServerContext* ctx) : call_(call), ctx_(ctx) {} void SendInitialMetadata() { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); CallOpSet ops; ops.SendInitialMetadata(ctx_->initial_metadata_); diff --git a/src/cpp/codegen/core_codegen.cc b/src/cpp/codegen/core_codegen.cc new file mode 100644 index 0000000000..ccae206291 --- /dev/null +++ b/src/cpp/codegen/core_codegen.cc @@ -0,0 +1,250 @@ +/* + * + * 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. + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/profiling/timers.h" + +namespace { + +const int kGrpcBufferWriterMaxBufferLength = 8192; + +class GrpcBufferWriter GRPC_FINAL + : public ::grpc::protobuf::io::ZeroCopyOutputStream { + public: + explicit GrpcBufferWriter(grpc_byte_buffer** bp, + int block_size) + : block_size_(block_size), byte_count_(0), have_backup_(false) { + *bp = grpc_raw_byte_buffer_create(NULL, 0); + slice_buffer_ = &(*bp)->data.raw.slice_buffer; + } + + ~GrpcBufferWriter() GRPC_OVERRIDE { + if (have_backup_) { + gpr_slice_unref(backup_slice_); + } + } + + bool Next(void** data, int* size) GRPC_OVERRIDE { + if (have_backup_) { + slice_ = backup_slice_; + have_backup_ = false; + } else { + slice_ = gpr_slice_malloc(block_size_); + } + *data = GPR_SLICE_START_PTR(slice_); + // On win x64, int is only 32bit + GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + gpr_slice_buffer_add(slice_buffer_, slice_); + return true; + } + + void BackUp(int count) GRPC_OVERRIDE { + gpr_slice_buffer_pop(slice_buffer_); + if (count == block_size_) { + backup_slice_ = slice_; + } else { + backup_slice_ = + gpr_slice_split_tail(&slice_, GPR_SLICE_LENGTH(slice_) - count); + gpr_slice_buffer_add(slice_buffer_, slice_); + } + have_backup_ = true; + byte_count_ -= count; + } + + grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; } + + private: + const int block_size_; + int64_t byte_count_; + gpr_slice_buffer* slice_buffer_; + bool have_backup_; + gpr_slice backup_slice_; + gpr_slice slice_; +}; + +class GrpcBufferReader GRPC_FINAL + : public ::grpc::protobuf::io::ZeroCopyInputStream { + public: + explicit GrpcBufferReader(grpc_byte_buffer* buffer) + : byte_count_(0), backup_count_(0) { + grpc_byte_buffer_reader_init(&reader_, buffer); + } + ~GrpcBufferReader() GRPC_OVERRIDE { + grpc_byte_buffer_reader_destroy(&reader_); + } + + bool Next(const void** data, int* size) GRPC_OVERRIDE { + if (backup_count_ > 0) { + *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - + backup_count_; + GPR_ASSERT(backup_count_ <= INT_MAX); + *size = (int)backup_count_; + backup_count_ = 0; + return true; + } + if (!grpc_byte_buffer_reader_next(&reader_, &slice_)) { + return false; + } + gpr_slice_unref(slice_); + *data = GPR_SLICE_START_PTR(slice_); + // On win x64, int is only 32bit + GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + return true; + } + + void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } + + bool Skip(int count) GRPC_OVERRIDE { + const void* data; + int size; + while (Next(&data, &size)) { + if (size >= count) { + BackUp(size - count); + return true; + } + // size < count; + count -= size; + } + // error or we have too large count; + return false; + } + + grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { + return byte_count_ - backup_count_; + } + + private: + int64_t byte_count_; + int64_t backup_count_; + grpc_byte_buffer_reader reader_; + gpr_slice slice_; +}; +} // namespace + +namespace grpc { + +class CoreCodegen : public CoreCodegenInterface { + private: + grpc_completion_queue* CompletionQueueCreate() override { + return grpc_completion_queue_create(nullptr); + } + + grpc_event CompletionQueuePluck(grpc_completion_queue* cq, void* tag, + gpr_timespec deadline) override { + return grpc_completion_queue_pluck(cq, tag, deadline, nullptr); + } + + void* gpr_malloc(size_t size) override { + return ::gpr_malloc(size); + } + + void gpr_free(void* p) override { + return ::gpr_free(p); + } + + void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override { + ::grpc_byte_buffer_destroy(bb); + } + + void grpc_metadata_array_init(grpc_metadata_array* array) override { + ::grpc_metadata_array_init(array); + } + + void grpc_metadata_array_destroy(grpc_metadata_array* array) override { + ::grpc_metadata_array_destroy(array); + } + + void assert_fail(const char* failed_assertion) override { + gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); + abort(); + } + + Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) override { + GPR_TIMER_SCOPE("SerializeProto", 0); + int byte_size = msg.ByteSize(); + if (byte_size <= kGrpcBufferWriterMaxBufferLength) { + gpr_slice slice = gpr_slice_malloc(byte_size); + GPR_ASSERT(GPR_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + *bp = grpc_raw_byte_buffer_create(&slice, 1); + gpr_slice_unref(slice); + return Status::OK; + } else { + GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); + return msg.SerializeToZeroCopyStream(&writer) + ? Status::OK + : Status(StatusCode::INTERNAL, "Failed to serialize message"); + } + } + + Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, int max_message_size) override { + GPR_TIMER_SCOPE("DeserializeProto", 0); + if (buffer == nullptr) { + return Status(StatusCode::INTERNAL, "No payload"); + } + GrpcBufferReader reader(buffer); + ::grpc::protobuf::io::CodedInputStream decoder(&reader); + if (max_message_size > 0) { + decoder.SetTotalBytesLimit(max_message_size, max_message_size); + } + if (!msg->ParseFromCodedStream(&decoder)) { + grpc_byte_buffer_destroy(buffer); + return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); + } + if (!decoder.ConsumedEntireMessage()) { + grpc_byte_buffer_destroy(buffer); + return Status(StatusCode::INTERNAL, "Did not read entire message"); + } + grpc_byte_buffer_destroy(buffer); + return Status::OK; + } +}; + +} // namespace grpc diff --git a/src/cpp/common/call.cc b/src/cpp/common/call.cc deleted file mode 100644 index 5b87c2a806..0000000000 --- a/src/cpp/common/call.cc +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -#include - -#include -#include -#include -#include -#include "src/core/profiling/timers.h" - -namespace grpc { - -void FillMetadataMap( - grpc_metadata_array* arr, - std::multimap* metadata) { - for (size_t i = 0; i < arr->count; i++) { - // TODO(yangg) handle duplicates? - metadata->insert(std::pair( - arr->metadata[i].key, grpc::string_ref(arr->metadata[i].value, - arr->metadata[i].value_length))); - } - grpc_metadata_array_destroy(arr); - grpc_metadata_array_init(arr); -} - -// TODO(yangg) if the map is changed before we send, the pointers will be a -// mess. Make sure it does not happen. -grpc_metadata* FillMetadataArray( - const std::multimap& metadata) { - if (metadata.empty()) { - return nullptr; - } - grpc_metadata* metadata_array = - (grpc_metadata*)gpr_malloc(metadata.size() * sizeof(grpc_metadata)); - size_t i = 0; - for (auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) { - metadata_array[i].key = iter->first.c_str(); - metadata_array[i].value = iter->second.c_str(); - metadata_array[i].value_length = iter->second.size(); - } - return metadata_array; -} - -Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) - : call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} - -Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq, - int max_message_size) - : call_hook_(call_hook), - cq_(cq), - call_(call), - max_message_size_(max_message_size) {} - -void Call::PerformOps(CallOpSetInterface* ops) { - if (max_message_size_ > 0) { - ops->set_max_message_size(max_message_size_); - } - call_hook_->PerformOpsOnCall(ops, this); -} - -} // namespace grpc diff --git a/src/cpp/proto/proto_serializer.cc b/src/cpp/proto/proto_serializer.cc deleted file mode 100644 index d5ed138561..0000000000 --- a/src/cpp/proto/proto_serializer.cc +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * 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. - * - */ - -// TODO(dgq): This file is part of a temporary fix to work around codegen -// issues. -// -// This whole file will be removed in the future. - -#include - -static grpc::ProtoSerializer proto_serializer; -grpc::ProtoSerializerInterface* grpc::g_proto_serializer = &proto_serializer; diff --git a/src/cpp/proto/proto_utils.cc b/src/cpp/proto/proto_utils.cc deleted file mode 100644 index a95a290f67..0000000000 --- a/src/cpp/proto/proto_utils.cc +++ /dev/null @@ -1,206 +0,0 @@ -/* - * - * Copyright 2015-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. - * - */ - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "src/core/profiling/timers.h" - -const int kMaxBufferLength = 8192; - -class GrpcBufferWriter GRPC_FINAL - : public ::grpc::protobuf::io::ZeroCopyOutputStream { - public: - explicit GrpcBufferWriter(grpc_byte_buffer** bp, - int block_size = kMaxBufferLength) - : block_size_(block_size), byte_count_(0), have_backup_(false) { - *bp = grpc_raw_byte_buffer_create(NULL, 0); - slice_buffer_ = &(*bp)->data.raw.slice_buffer; - } - - ~GrpcBufferWriter() GRPC_OVERRIDE { - if (have_backup_) { - gpr_slice_unref(backup_slice_); - } - } - - bool Next(void** data, int* size) GRPC_OVERRIDE { - if (have_backup_) { - slice_ = backup_slice_; - have_backup_ = false; - } else { - slice_ = gpr_slice_malloc(block_size_); - } - *data = GPR_SLICE_START_PTR(slice_); - // On win x64, int is only 32bit - GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - gpr_slice_buffer_add(slice_buffer_, slice_); - return true; - } - - void BackUp(int count) GRPC_OVERRIDE { - gpr_slice_buffer_pop(slice_buffer_); - if (count == block_size_) { - backup_slice_ = slice_; - } else { - backup_slice_ = - gpr_slice_split_tail(&slice_, GPR_SLICE_LENGTH(slice_) - count); - gpr_slice_buffer_add(slice_buffer_, slice_); - } - have_backup_ = true; - byte_count_ -= count; - } - - grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; } - - private: - const int block_size_; - int64_t byte_count_; - gpr_slice_buffer* slice_buffer_; - bool have_backup_; - gpr_slice backup_slice_; - gpr_slice slice_; -}; - -class GrpcBufferReader GRPC_FINAL - : public ::grpc::protobuf::io::ZeroCopyInputStream { - public: - explicit GrpcBufferReader(grpc_byte_buffer* buffer) - : byte_count_(0), backup_count_(0) { - grpc_byte_buffer_reader_init(&reader_, buffer); - } - ~GrpcBufferReader() GRPC_OVERRIDE { - grpc_byte_buffer_reader_destroy(&reader_); - } - - bool Next(const void** data, int* size) GRPC_OVERRIDE { - if (backup_count_ > 0) { - *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - - backup_count_; - GPR_ASSERT(backup_count_ <= INT_MAX); - *size = (int)backup_count_; - backup_count_ = 0; - return true; - } - if (!grpc_byte_buffer_reader_next(&reader_, &slice_)) { - return false; - } - gpr_slice_unref(slice_); - *data = GPR_SLICE_START_PTR(slice_); - // On win x64, int is only 32bit - GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - return true; - } - - void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } - - bool Skip(int count) GRPC_OVERRIDE { - const void* data; - int size; - while (Next(&data, &size)) { - if (size >= count) { - BackUp(size - count); - return true; - } - // size < count; - count -= size; - } - // error or we have too large count; - return false; - } - - grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { - return byte_count_ - backup_count_; - } - - private: - int64_t byte_count_; - int64_t backup_count_; - grpc_byte_buffer_reader reader_; - gpr_slice slice_; -}; - -namespace grpc { - -Status ProtoSerializer::SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) { - GPR_TIMER_SCOPE("SerializeProto", 0); - int byte_size = msg.ByteSize(); - if (byte_size <= kMaxBufferLength) { - gpr_slice slice = gpr_slice_malloc(byte_size); - GPR_ASSERT(GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); - *bp = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); - return Status::OK; - } else { - GrpcBufferWriter writer(bp); - return msg.SerializeToZeroCopyStream(&writer) - ? Status::OK - : Status(StatusCode::INTERNAL, "Failed to serialize message"); - } -} - -Status ProtoSerializer::DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) { - GPR_TIMER_SCOPE("DeserializeProto", 0); - if (!buffer) { - return Status(StatusCode::INTERNAL, "No payload"); - } - GrpcBufferReader reader(buffer); - ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_message_size > 0) { - decoder.SetTotalBytesLimit(max_message_size, max_message_size); - } - if (!msg->ParseFromCodedStream(&decoder)) { - return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); - } - if (!decoder.ConsumedEntireMessage()) { - return Status(StatusCode::INTERNAL, "Did not read entire message"); - } - return Status::OK; -} - -} // namespace grpc diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc deleted file mode 100644 index 66c79a1818..0000000000 --- a/src/cpp/util/string_ref.cc +++ /dev/null @@ -1,104 +0,0 @@ -/* - * - * Copyright 2015, 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. - * - */ - -#include - -#include - -#include -#include - -namespace grpc { - -const size_t string_ref::npos = size_t(-1); - -string_ref& string_ref::operator=(const string_ref& rhs) { - data_ = rhs.data_; - length_ = rhs.length_; - return *this; -} - -string_ref::string_ref(const char* s) : data_(s), length_(strlen(s)) {} - -string_ref string_ref::substr(size_t pos, size_t n) const { - if (pos > length_) pos = length_; - if (n > (length_ - pos)) n = length_ - pos; - return string_ref(data_ + pos, n); -} - -int string_ref::compare(string_ref x) const { - size_t min_size = length_ < x.length_ ? length_ : x.length_; - int r = memcmp(data_, x.data_, min_size); - if (r < 0) return -1; - if (r > 0) return 1; - if (length_ < x.length_) return -1; - if (length_ > x.length_) return 1; - return 0; -} - -bool string_ref::starts_with(string_ref x) const { - return length_ >= x.length_ && (memcmp(data_, x.data_, x.length_) == 0); -} - -bool string_ref::ends_with(string_ref x) const { - return length_ >= x.length_ && - (memcmp(data_ + (length_ - x.length_), x.data_, x.length_) == 0); -} - -size_t string_ref::find(string_ref s) const { - auto it = std::search(cbegin(), cend(), s.cbegin(), s.cend()); - return it == cend() ? npos : std::distance(cbegin(), it); -} - -size_t string_ref::find(char c) const { - auto it = std::find(cbegin(), cend(), c); - return it == cend() ? npos : std::distance(cbegin(), it); -} - -bool operator==(string_ref x, string_ref y) { return x.compare(y) == 0; } - -bool operator!=(string_ref x, string_ref y) { return x.compare(y) != 0; } - -bool operator<(string_ref x, string_ref y) { return x.compare(y) < 0; } - -bool operator<=(string_ref x, string_ref y) { return x.compare(y) <= 0; } - -bool operator>(string_ref x, string_ref y) { return x.compare(y) > 0; } - -bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } - -std::ostream& operator<<(std::ostream& out, const string_ref& string) { - return out << grpc::string(string.begin(), string.end()); -} - -} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index ead8bec14e..05c3b4fb4b 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -812,6 +812,7 @@ src/cpp/common/create_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ src/cpp/client/secure_credentials.cc \ +src/cpp/codegen/core_codegen.cc \ src/cpp/codegen/grpc_library.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ @@ -825,12 +826,9 @@ src/cpp/client/create_channel_internal.cc \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ -src/cpp/common/call.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ src/cpp/common/rpc_method.cc \ -src/cpp/proto/proto_serializer.cc \ -src/cpp/proto/proto_utils.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ src/cpp/server/dynamic_thread_pool.cc \ @@ -842,7 +840,6 @@ src/cpp/server/server_credentials.cc \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ -src/cpp/util/string_ref.cc \ src/cpp/util/time.cc # This tag can be used to specify the character encoding of the source files diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index bbbe8e72a9..277f59f77d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5036,9 +5036,9 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", + "src/cpp/codegen/core_codegen.cc", "src/cpp/codegen/grpc_library.cc", "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/call.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/create_auth_context.h", @@ -5047,8 +5047,6 @@ "src/cpp/common/secure_auth_context.h", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/proto/proto_serializer.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -5064,7 +5062,6 @@ "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc" ], "third_party": false, @@ -5086,6 +5083,7 @@ "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", "include/grpc++/impl/codegen/proto_utils.h", @@ -5134,9 +5132,9 @@ "include/grpc++/impl/codegen/completion_queue_tag.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_serializer.cc", "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", @@ -5338,14 +5336,11 @@ "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/call.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/create_auth_context.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/rpc_method.cc", - "src/cpp/proto/proto_serializer.cc", - "src/cpp/proto/proto_utils.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", "src/cpp/server/dynamic_thread_pool.cc", @@ -5359,7 +5354,6 @@ "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", - "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc" ], "third_party": false, diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 64c6a24b68..c15d9508ad 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -315,6 +315,8 @@ + + @@ -341,18 +343,12 @@ - - - - - - @@ -375,8 +371,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 8dde6946a8..e986377748 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -4,6 +4,9 @@ src\cpp\client + + src\cpp\codegen + src\cpp\codegen @@ -43,9 +46,6 @@ src\cpp\client - - src\cpp\common - src\cpp\common @@ -55,12 +55,6 @@ src\cpp\common - - src\cpp\proto - - - src\cpp\proto - src\cpp\server @@ -94,9 +88,6 @@ src\cpp\util - - src\cpp\util - src\cpp\util @@ -293,9 +284,6 @@ {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} - - {c22e8b9b-d2eb-a2e8-0cb8-3f7e3c902a7b} - {321b0980-74ad-e8ca-f23b-deffa5d6bb8f} diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index d64afde0ce..6210c914a0 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -158,6 +158,7 @@ + @@ -193,7 +194,7 @@ - + diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index a3e3ac8c35..9803bbb9d1 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -1,10 +1,5 @@ - - - include\grpc++\impl\codegen - - include\grpc++\impl\codegen @@ -39,6 +34,9 @@ include\grpc++\impl\codegen + + include\grpc++\impl\codegen + include\grpc++\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 6094f41ba1..a66823f7a8 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -326,18 +326,12 @@ - - - - - - @@ -360,8 +354,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 5f242baebc..4ccea5bc69 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -25,9 +25,6 @@ src\cpp\client - - src\cpp\common - src\cpp\common @@ -37,12 +34,6 @@ src\cpp\common - - src\cpp\proto - - - src\cpp\proto - src\cpp\server @@ -76,9 +67,6 @@ src\cpp\util - - src\cpp\util - src\cpp\util @@ -263,9 +251,6 @@ {ed8e4daa-825f-fbe5-2a45-846ad9165d3d} - - {10b51a99-2e57-249e-ce23-3ab8c6b99ffb} - {8a54a279-d14b-4237-0df3-1ffe1ef5a7af} -- cgit v1.2.3 From e1ce31eda3321bb0052416ba47145809a8199f1e Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 7 Mar 2016 18:19:12 -0800 Subject: wip. cq refactored --- include/grpc++/impl/codegen/client_context.h | 3 +- include/grpc++/impl/codegen/completion_queue.h | 36 +++++++++++++++++++--- .../grpc++/impl/codegen/core_codegen_interface.h | 21 ++++++++----- include/grpc++/impl/codegen/grpc_library.h | 5 +-- include/grpc++/impl/codegen/impl/async_stream.h | 25 +++++++-------- include/grpc++/impl/codegen/server_interface.h | 5 +-- include/grpc++/impl/codegen/service_type.h | 10 ++---- include/grpc/impl/codegen/time.h | 31 ++++++++++++++++--- src/core/support/time.c | 24 --------------- src/cpp/codegen/core_codegen.cc | 34 ++++++++++---------- src/cpp/common/completion_queue.cc | 33 +++----------------- 11 files changed, 118 insertions(+), 109 deletions(-) diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index db2afe930c..271d464583 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -54,6 +54,7 @@ #include #include +#include #include #include #include @@ -192,7 +193,7 @@ class ClientContext { /// \return A multimap of initial metadata key-value pairs from the server. const std::multimap& GetServerInitialMetadata() { - GPR_ASSERT(initial_metadata_received_); + GPR_CODEGEN_ASSERT(initial_metadata_received_); return recv_initial_metadata_; } diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 102831e1c9..6473494d86 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -36,6 +36,9 @@ #ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H +#include +#include +#include #include #include #include @@ -76,13 +79,17 @@ class Server; class ServerBuilder; class ServerContext; +extern CoreCodegenInterface* g_core_codegen_interface; + /// A thin wrapper around \a grpc_completion_queue (see / \a /// src/core/surface/completion_queue.h). class CompletionQueue : private GrpcLibrary { public: /// Default constructor. Implicitly creates a \a grpc_completion_queue /// instance. - CompletionQueue(); + CompletionQueue() { + cq_ = g_core_codegen_interface->grpc_completion_queue_create(nullptr); + } /// Wrap \a take, taking ownership of the instance. /// @@ -90,7 +97,9 @@ class CompletionQueue : private GrpcLibrary { explicit CompletionQueue(grpc_completion_queue* take); /// Destructor. Destroys the owned wrapped completion queue / instance. - ~CompletionQueue(); + ~CompletionQueue() { + g_core_codegen_interface->grpc_completion_queue_destroy(cq_); + } /// Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT. enum NextStatus { @@ -181,10 +190,29 @@ class CompletionQueue : private GrpcLibrary { /// Wraps \a grpc_completion_queue_pluck. /// \warning Must not be mixed with calls to \a Next. - bool Pluck(CompletionQueueTag* tag); + bool Pluck(CompletionQueueTag* tag) { + auto deadline = gpr_inf_future(GPR_CLOCK_REALTIME); + auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( + cq_, tag, deadline, nullptr); + bool ok = ev.success != 0; + void* ignored = tag; + GPR_CODEGEN_ASSERT(tag->FinalizeResult(&ignored, &ok)); + GPR_CODEGEN_ASSERT(ignored == tag); + // Ignore mutations by FinalizeResult: Pluck returns the C API status + return ev.success != 0; + } /// Performs a single polling pluck on \a tag. - void TryPluck(CompletionQueueTag* tag); + void TryPluck(CompletionQueueTag* tag) { + auto deadline = gpr_time_0(GPR_CLOCK_REALTIME); + auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( + cq_, tag, deadline, nullptr); + if (ev.type == GRPC_QUEUE_TIMEOUT) return; + bool ok = ev.success != 0; + void* ignored = tag; + // the tag must be swallowed if using TryPluck + GPR_CODEGEN_ASSERT(!tag->FinalizeResult(&ignored, &ok)); + } grpc_completion_queue* cq_; // owned }; diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index b1b128cc4a..f043f96072 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -43,9 +43,13 @@ namespace grpc { class CoreCodegenInterface { public: - virtual grpc_completion_queue* CompletionQueueCreate() = 0; - virtual grpc_event CompletionQueuePluck(grpc_completion_queue* cq, void* tag, - gpr_timespec deadline) = 0; + virtual grpc_completion_queue* grpc_completion_queue_create( + void* reserved) = 0; + virtual void grpc_completion_queue_destroy(grpc_completion_queue* cq) = 0; + virtual grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, + void* tag, + gpr_timespec deadline, + void* reserved) = 0; // Serialize the msg into a buffer created inside the function. The caller // should destroy the returned buffer when done with it. If serialization @@ -70,11 +74,12 @@ class CoreCodegenInterface { }; /* XXX */ -#define GPR_CODEGEN_ASSERT(x) \ - do { \ - if (!(x)) { \ - g_core_codegen_interface->assert_fail(#x); \ - } \ +#define GPR_CODEGEN_ASSERT(x) \ + do { \ + if (!(x)) { \ + extern CoreCodegenInterface* g_core_codegen_interface; \ + g_core_codegen_interface->assert_fail(#x); \ + } \ } while (0) } // namespace grpc diff --git a/include/grpc++/impl/codegen/grpc_library.h b/include/grpc++/impl/codegen/grpc_library.h index eb7152a2c6..ef076315f5 100644 --- a/include/grpc++/impl/codegen/grpc_library.h +++ b/include/grpc++/impl/codegen/grpc_library.h @@ -35,6 +35,7 @@ #define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H #include +#include namespace grpc { @@ -49,13 +50,13 @@ extern GrpcLibraryInterface* g_glip; class GrpcLibrary { public: GrpcLibrary() { - GPR_ASSERT(g_glip && + GPR_CODEGEN_ASSERT(g_glip && "gRPC library not initialized. See " "grpc::internal::GrpcLibraryInitializer."); g_glip->init(); } virtual ~GrpcLibrary() { - GPR_ASSERT(g_glip && + GPR_CODEGEN_ASSERT(g_glip && "gRPC library not initialized. See " "grpc::internal::GrpcLibraryInitializer."); g_glip->shutdown(); diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h index b0410485f8..fea935a362 100644 --- a/include/grpc++/impl/codegen/impl/async_stream.h +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -109,13 +110,13 @@ class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface { init_ops_.set_output_tag(tag); init_ops_.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert - GPR_ASSERT(init_ops_.SendMessage(request).ok()); + GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok()); init_ops_.ClientSendClose(); call_.PerformOps(&init_ops_); } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -177,7 +178,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -187,7 +188,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_ops_.set_output_tag(tag); // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -243,7 +244,7 @@ class ClientAsyncReaderWriter GRPC_FINAL } void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!context_->initial_metadata_received_); + GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); meta_ops_.set_output_tag(tag); meta_ops_.RecvInitialMetadata(context_); @@ -262,7 +263,7 @@ class ClientAsyncReaderWriter GRPC_FINAL void Write(const W& msg, void* tag) GRPC_OVERRIDE { write_ops_.set_output_tag(tag); // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -300,7 +301,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -331,7 +332,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, } void FinishWithError(const Status& status, void* tag) { - GPR_ASSERT(!status.ok()); + GPR_CODEGEN_ASSERT(!status.ok()); finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -360,7 +361,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -375,7 +376,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, ctx_->sent_initial_metadata_ = true; } // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } @@ -409,7 +410,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} void SendInitialMetadata(void* tag) GRPC_OVERRIDE { - GPR_ASSERT(!ctx_->sent_initial_metadata_); + GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); meta_ops_.set_output_tag(tag); meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -430,7 +431,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, ctx_->sent_initial_metadata_ = true; } // TODO(ctiller): don't assert - GPR_ASSERT(write_ops_.SendMessage(msg).ok()); + GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); call_.PerformOps(&write_ops_); } diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h index f934619c20..1dcc01285a 100644 --- a/include/grpc++/impl/codegen/server_interface.h +++ b/include/grpc++/impl/codegen/server_interface.h @@ -37,6 +37,7 @@ #include #include #include +#include #include namespace grpc { @@ -223,7 +224,7 @@ class ServerInterface : public CallHook { CompletionQueue* call_cq, ServerCompletionQueue* notification_cq, void* tag, Message* message) { - GPR_ASSERT(method); + GPR_CODEGEN_ASSERT(method); new PayloadAsyncRequest(method->server_tag(), this, context, stream, call_cq, notification_cq, tag, message); @@ -233,7 +234,7 @@ class ServerInterface : public CallHook { ServerAsyncStreamingInterface* stream, CompletionQueue* call_cq, ServerCompletionQueue* notification_cq, void* tag) { - GPR_ASSERT(method); + GPR_CODEGEN_ASSERT(method); new NoPayloadAsyncRequest(method->server_tag(), this, context, stream, call_cq, notification_cq, tag); } diff --git a/include/grpc++/impl/codegen/service_type.h b/include/grpc++/impl/codegen/service_type.h index deb91a41d9..901468e3ee 100644 --- a/include/grpc++/impl/codegen/service_type.h +++ b/include/grpc++/impl/codegen/service_type.h @@ -35,6 +35,7 @@ #define GRPCXX_IMPL_CODEGEN_SERVICE_TYPE_H #include +#include #include #include #include @@ -131,21 +132,16 @@ class Service { void AddMethod(RpcServiceMethod* method) { methods_.emplace_back(method); } void MarkMethodAsync(int index) { - if (methods_[index].get() == nullptr) { - gpr_log(GPR_ERROR, + GPR_CODEGEN_ASSERT(methods_[index].get() != nullptr && "Cannot mark the method as 'async' because it has already been " "marked as 'generic'."); - return; - } methods_[index]->ResetHandler(); } void MarkMethodGeneric(int index) { - if (methods_[index]->handler() == nullptr) { - gpr_log(GPR_ERROR, + GPR_CODEGEN_ASSERT(methods_[index]->handler() != nullptr && "Cannot mark the method as 'generic' because it has already been " "marked as 'async'."); - } methods_[index].reset(); } diff --git a/include/grpc/impl/codegen/time.h b/include/grpc/impl/codegen/time.h index c22bedfe77..9776dabc11 100644 --- a/include/grpc/impl/codegen/time.h +++ b/include/grpc/impl/codegen/time.h @@ -69,10 +69,33 @@ typedef struct gpr_timespec { } gpr_timespec; /* Time constants. */ -GPRAPI gpr_timespec -gpr_time_0(gpr_clock_type type); /* The zero time interval. */ -GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type); /* The far future */ -GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type); /* The far past. */ +/* The zero time interval. */ +GPRAPI static inline gpr_timespec gpr_time_0(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = 0; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +/* The far future */ +GPRAPI static inline gpr_timespec gpr_inf_future(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = INT64_MAX; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +/* The far past. */ +GPRAPI static inline gpr_timespec gpr_inf_past(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = INT64_MIN; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + #define GPR_MS_PER_SEC 1000 #define GPR_US_PER_SEC 1000000 diff --git a/src/core/support/time.c b/src/core/support/time.c index 423d12ffc0..fec3c7a2c5 100644 --- a/src/core/support/time.c +++ b/src/core/support/time.c @@ -56,30 +56,6 @@ gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b) { return gpr_time_cmp(a, b) > 0 ? a : b; } -gpr_timespec gpr_time_0(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = 0; - out.tv_nsec = 0; - out.clock_type = type; - return out; -} - -gpr_timespec gpr_inf_future(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = INT64_MAX; - out.tv_nsec = 0; - out.clock_type = type; - return out; -} - -gpr_timespec gpr_inf_past(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = INT64_MIN; - out.tv_nsec = 0; - out.clock_type = type; - return out; -} - /* TODO(ctiller): consider merging _nanos, _micros, _millis into a single function for maintainability. Similarly for _seconds, _minutes, and _hours */ diff --git a/src/cpp/codegen/core_codegen.cc b/src/cpp/codegen/core_codegen.cc index ccae206291..00e8005f28 100644 --- a/src/cpp/codegen/core_codegen.cc +++ b/src/cpp/codegen/core_codegen.cc @@ -54,8 +54,7 @@ const int kGrpcBufferWriterMaxBufferLength = 8192; class GrpcBufferWriter GRPC_FINAL : public ::grpc::protobuf::io::ZeroCopyOutputStream { public: - explicit GrpcBufferWriter(grpc_byte_buffer** bp, - int block_size) + explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size) : block_size_(block_size), byte_count_(0), have_backup_(false) { *bp = grpc_raw_byte_buffer_create(NULL, 0); slice_buffer_ = &(*bp)->data.raw.slice_buffer; @@ -170,22 +169,23 @@ namespace grpc { class CoreCodegen : public CoreCodegenInterface { private: - grpc_completion_queue* CompletionQueueCreate() override { - return grpc_completion_queue_create(nullptr); + grpc_completion_queue* grpc_completion_queue_create(void* reserved) override { + return ::grpc_completion_queue_create(reserved); } - grpc_event CompletionQueuePluck(grpc_completion_queue* cq, void* tag, - gpr_timespec deadline) override { - return grpc_completion_queue_pluck(cq, tag, deadline, nullptr); + void grpc_completion_queue_destroy(grpc_completion_queue* cq) override { + ::grpc_completion_queue_destroy(cq); } - void* gpr_malloc(size_t size) override { - return ::gpr_malloc(size); + grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, + gpr_timespec deadline, + void* reserved) override { + return ::grpc_completion_queue_pluck(cq, tag, deadline, reserved); } - void gpr_free(void* p) override { - return ::gpr_free(p); - } + void* gpr_malloc(size_t size) override { return ::gpr_malloc(size); } + + void gpr_free(void* p) override { return ::gpr_free(p); } void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override { ::grpc_byte_buffer_destroy(bb); @@ -205,13 +205,14 @@ class CoreCodegen : public CoreCodegenInterface { } Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) override { + grpc_byte_buffer** bp) override { GPR_TIMER_SCOPE("SerializeProto", 0); int byte_size = msg.ByteSize(); if (byte_size <= kGrpcBufferWriterMaxBufferLength) { gpr_slice slice = gpr_slice_malloc(byte_size); - GPR_ASSERT(GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + GPR_ASSERT( + GPR_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); *bp = grpc_raw_byte_buffer_create(&slice, 1); gpr_slice_unref(slice); return Status::OK; @@ -224,7 +225,8 @@ class CoreCodegen : public CoreCodegenInterface { } Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, int max_message_size) override { + grpc::protobuf::Message* msg, + int max_message_size) override { GPR_TIMER_SCOPE("DeserializeProto", 0); if (buffer == nullptr) { return Status(StatusCode::INTERNAL, "No payload"); diff --git a/src/cpp/common/completion_queue.cc b/src/cpp/common/completion_queue.cc index 4f76dfff1d..729dc33749 100644 --- a/src/cpp/common/completion_queue.cc +++ b/src/cpp/common/completion_queue.cc @@ -34,7 +34,6 @@ #include -#include #include #include #include @@ -43,16 +42,13 @@ namespace grpc { static internal::GrpcLibraryInitializer g_gli_initializer; -CompletionQueue::CompletionQueue() { - g_gli_initializer.summon(); - cq_ = grpc_completion_queue_create(nullptr); -} CompletionQueue::CompletionQueue(grpc_completion_queue* take) : cq_(take) {} -CompletionQueue::~CompletionQueue() { grpc_completion_queue_destroy(cq_); } - -void CompletionQueue::Shutdown() { grpc_completion_queue_shutdown(cq_); } +void CompletionQueue::Shutdown() { + g_gli_initializer.summon(); + grpc_completion_queue_shutdown(cq_); +} CompletionQueue::NextStatus CompletionQueue::AsyncNextInternal( void** tag, bool* ok, gpr_timespec deadline) { @@ -75,25 +71,4 @@ CompletionQueue::NextStatus CompletionQueue::AsyncNextInternal( } } -bool CompletionQueue::Pluck(CompletionQueueTag* tag) { - auto deadline = gpr_inf_future(GPR_CLOCK_REALTIME); - auto ev = grpc_completion_queue_pluck(cq_, tag, deadline, nullptr); - bool ok = ev.success != 0; - void* ignored = tag; - GPR_ASSERT(tag->FinalizeResult(&ignored, &ok)); - GPR_ASSERT(ignored == tag); - // Ignore mutations by FinalizeResult: Pluck returns the C API status - return ev.success != 0; -} - -void CompletionQueue::TryPluck(CompletionQueueTag* tag) { - auto deadline = gpr_time_0(GPR_CLOCK_REALTIME); - auto ev = grpc_completion_queue_pluck(cq_, tag, deadline, nullptr); - if (ev.type == GRPC_QUEUE_TIMEOUT) return; - bool ok = ev.success != 0; - void* ignored = tag; - // the tag must be swallowed if using TryPluck - GPR_ASSERT(!tag->FinalizeResult(&ignored, &ok)); -} - } // namespace grpc -- cgit v1.2.3 From 8c3d9943f6061c9c2370ab7e165cb9219adc7a02 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 00:07:14 -0800 Subject: compiles! --- BUILD | 2 + Makefile | 3 + build.yaml | 4 +- .../grpc++/impl/codegen/core_codegen_interface.h | 15 +- include/grpc++/impl/codegen/string_ref.h | 2 +- include/grpc++/impl/grpc_library.h | 8 +- src/cpp/codegen/codegen_init.cc | 38 +++++ src/cpp/codegen/core_codegen.cc | 159 +++++++++++---------- src/cpp/codegen/core_codegen.h | 70 +++++++++ src/cpp/util/string_ref.cc | 40 ++++++ src/python/grpcio/grpc/_cython/imports.generated.h | 6 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 +- tools/doxygen/Doxyfile.c++.internal | 1 + tools/run_tests/sources_and_headers.json | 5 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 2 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 + .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 2 +- .../grpc++_codegen_lib.vcxproj.filters | 14 ++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 2 + .../grpc++_unsecure.vcxproj.filters | 3 + 20 files changed, 289 insertions(+), 96 deletions(-) create mode 100644 src/cpp/codegen/codegen_init.cc create mode 100644 src/cpp/codegen/core_codegen.h create mode 100644 src/cpp/util/string_ref.cc diff --git a/BUILD b/BUILD index 68ff306eca..6ebc094a08 100644 --- a/BUILD +++ b/BUILD @@ -824,6 +824,7 @@ cc_library( "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", + "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", ], hdrs = [ @@ -914,6 +915,7 @@ cc_library( "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", + "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", ], hdrs = [ diff --git a/Makefile b/Makefile index f27e2c465a..e9a31b2e29 100644 --- a/Makefile +++ b/Makefile @@ -3042,6 +3042,7 @@ LIBGRPC++_SRC = \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ + src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ PUBLIC_HEADERS_CXX += \ @@ -3154,6 +3155,7 @@ endif LIBGRPC++_CODEGEN_LIB_SRC = \ + src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/async_stream.h \ @@ -3368,6 +3370,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ + src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ PUBLIC_HEADERS_CXX += \ diff --git a/build.yaml b/build.yaml index df64c231c1..a53da04fee 100644 --- a/build.yaml +++ b/build.yaml @@ -198,6 +198,7 @@ filegroups: - src/cpp/util/byte_buffer.cc - src/cpp/util/slice.cc - src/cpp/util/status.cc + - src/cpp/util/string_ref.cc - src/cpp/util/time.cc - name: grpc_base public_headers: @@ -746,7 +747,8 @@ libs: - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h headers: [] - src: [] + src: + - src/cpp/codegen/codegen_init.cc deps: - grpc_codegen_lib filegroups: diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index f043f96072..a27c1f8057 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -41,6 +41,10 @@ namespace grpc { +class CoreCodegenInterface; + +extern CoreCodegenInterface* g_core_codegen_interface; + class CoreCodegenInterface { public: virtual grpc_completion_queue* grpc_completion_queue_create( @@ -74,12 +78,11 @@ class CoreCodegenInterface { }; /* XXX */ -#define GPR_CODEGEN_ASSERT(x) \ - do { \ - if (!(x)) { \ - extern CoreCodegenInterface* g_core_codegen_interface; \ - g_core_codegen_interface->assert_fail(#x); \ - } \ +#define GPR_CODEGEN_ASSERT(x) \ + do { \ + if (!(x)) { \ + grpc::g_core_codegen_interface->assert_fail(#x); \ + } \ } while (0) } // namespace grpc diff --git a/include/grpc++/impl/codegen/string_ref.h b/include/grpc++/impl/codegen/string_ref.h index 29d85d92dc..4af2000ffd 100644 --- a/include/grpc++/impl/codegen/string_ref.h +++ b/include/grpc++/impl/codegen/string_ref.h @@ -60,7 +60,7 @@ class string_ref { typedef std::reverse_iterator const_reverse_iterator; // constants - const static size_t npos = size_t(-1); + const static size_t npos; // construct/copy. string_ref() : data_(nullptr), length_(0) {} diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h index e8a075f5eb..207053e63b 100644 --- a/include/grpc++/impl/grpc_library.h +++ b/include/grpc++/impl/grpc_library.h @@ -40,6 +40,8 @@ #include #include +#include "src/cpp/codegen/core_codegen.h" + namespace grpc { namespace internal { @@ -51,10 +53,14 @@ class GrpcLibrary GRPC_FINAL : public GrpcLibraryInterface { }; static GrpcLibrary g_gli; +static CoreCodegen g_core_codegen; class GrpcLibraryInitializer GRPC_FINAL { public: - GrpcLibraryInitializer() { grpc::g_glip = &g_gli; } + GrpcLibraryInitializer() { + grpc::g_glip = &g_gli; + grpc::g_core_codegen_interface = &g_core_codegen; + } /// A no-op method to force the linker to reference this class, which will /// take care of initializing and shutting down the gRPC runtime. diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc new file mode 100644 index 0000000000..99b6c9c04e --- /dev/null +++ b/src/cpp/codegen/codegen_init.cc @@ -0,0 +1,38 @@ +/* + * + * 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. + * + */ + +#include +#include + +grpc::CoreCodegenInterface *grpc::g_core_codegen_interface = nullptr; +grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; diff --git a/src/cpp/codegen/core_codegen.cc b/src/cpp/codegen/core_codegen.cc index 00e8005f28..b052cc60eb 100644 --- a/src/cpp/codegen/core_codegen.cc +++ b/src/cpp/codegen/core_codegen.cc @@ -31,9 +31,10 @@ * */ +#include "src/cpp/codegen/core_codegen.h" + #include -#include #include #include #include @@ -47,6 +48,8 @@ #include "src/core/profiling/timers.h" +grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; + namespace { const int kGrpcBufferWriterMaxBufferLength = 8192; @@ -167,86 +170,84 @@ class GrpcBufferReader GRPC_FINAL namespace grpc { -class CoreCodegen : public CoreCodegenInterface { - private: - grpc_completion_queue* grpc_completion_queue_create(void* reserved) override { - return ::grpc_completion_queue_create(reserved); - } - - void grpc_completion_queue_destroy(grpc_completion_queue* cq) override { - ::grpc_completion_queue_destroy(cq); - } - - grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, - gpr_timespec deadline, - void* reserved) override { - return ::grpc_completion_queue_pluck(cq, tag, deadline, reserved); - } - - void* gpr_malloc(size_t size) override { return ::gpr_malloc(size); } - - void gpr_free(void* p) override { return ::gpr_free(p); } - - void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override { - ::grpc_byte_buffer_destroy(bb); - } - - void grpc_metadata_array_init(grpc_metadata_array* array) override { - ::grpc_metadata_array_init(array); - } - - void grpc_metadata_array_destroy(grpc_metadata_array* array) override { - ::grpc_metadata_array_destroy(array); - } - - void assert_fail(const char* failed_assertion) override { - gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); - abort(); - } - - Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) override { - GPR_TIMER_SCOPE("SerializeProto", 0); - int byte_size = msg.ByteSize(); - if (byte_size <= kGrpcBufferWriterMaxBufferLength) { - gpr_slice slice = gpr_slice_malloc(byte_size); - GPR_ASSERT( - GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); - *bp = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); - return Status::OK; - } else { - GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); - return msg.SerializeToZeroCopyStream(&writer) - ? Status::OK - : Status(StatusCode::INTERNAL, "Failed to serialize message"); - } +grpc_completion_queue* CoreCodegen::grpc_completion_queue_create( + void* reserved) { + return ::grpc_completion_queue_create(reserved); +} + +void CoreCodegen::grpc_completion_queue_destroy(grpc_completion_queue* cq) { + ::grpc_completion_queue_destroy(cq); +} + +grpc_event CoreCodegen::grpc_completion_queue_pluck(grpc_completion_queue* cq, + void* tag, + gpr_timespec deadline, + void* reserved) { + return ::grpc_completion_queue_pluck(cq, tag, deadline, reserved); +} + +void* CoreCodegen::gpr_malloc(size_t size) { return ::gpr_malloc(size); } + +void CoreCodegen::gpr_free(void* p) { return ::gpr_free(p); } + +void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) { + ::grpc_byte_buffer_destroy(bb); +} + +void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { + ::grpc_metadata_array_init(array); +} + +void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { + ::grpc_metadata_array_destroy(array); +} + +void CoreCodegen::assert_fail(const char* failed_assertion) { + gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); + abort(); +} + +Status CoreCodegen::SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) { + GPR_TIMER_SCOPE("SerializeProto", 0); + int byte_size = msg.ByteSize(); + if (byte_size <= kGrpcBufferWriterMaxBufferLength) { + gpr_slice slice = gpr_slice_malloc(byte_size); + GPR_ASSERT(GPR_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + *bp = grpc_raw_byte_buffer_create(&slice, 1); + gpr_slice_unref(slice); + return Status::OK; + } else { + GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); + return msg.SerializeToZeroCopyStream(&writer) + ? Status::OK + : Status(StatusCode::INTERNAL, "Failed to serialize message"); + } +} + +Status CoreCodegen::DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) { + GPR_TIMER_SCOPE("DeserializeProto", 0); + if (buffer == nullptr) { + return Status(StatusCode::INTERNAL, "No payload"); + } + GrpcBufferReader reader(buffer); + ::grpc::protobuf::io::CodedInputStream decoder(&reader); + if (max_message_size > 0) { + decoder.SetTotalBytesLimit(max_message_size, max_message_size); + } + if (!msg->ParseFromCodedStream(&decoder)) { + grpc_byte_buffer_destroy(buffer); + return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); } - - Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) override { - GPR_TIMER_SCOPE("DeserializeProto", 0); - if (buffer == nullptr) { - return Status(StatusCode::INTERNAL, "No payload"); - } - GrpcBufferReader reader(buffer); - ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_message_size > 0) { - decoder.SetTotalBytesLimit(max_message_size, max_message_size); - } - if (!msg->ParseFromCodedStream(&decoder)) { - grpc_byte_buffer_destroy(buffer); - return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); - } - if (!decoder.ConsumedEntireMessage()) { - grpc_byte_buffer_destroy(buffer); - return Status(StatusCode::INTERNAL, "Did not read entire message"); - } + if (!decoder.ConsumedEntireMessage()) { grpc_byte_buffer_destroy(buffer); - return Status::OK; + return Status(StatusCode::INTERNAL, "Did not read entire message"); } -}; + grpc_byte_buffer_destroy(buffer); + return Status::OK; +} } // namespace grpc diff --git a/src/cpp/codegen/core_codegen.h b/src/cpp/codegen/core_codegen.h new file mode 100644 index 0000000000..b591209427 --- /dev/null +++ b/src/cpp/codegen/core_codegen.h @@ -0,0 +1,70 @@ +/* + * + * 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. + * + */ + +#include +#include +#include + +namespace grpc { + +class CoreCodegen : public CoreCodegenInterface { + private: + grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; + + void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; + + grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, + gpr_timespec deadline, + void* reserved) override; + + void* gpr_malloc(size_t size) override; + + void gpr_free(void* p) override; + + void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; + + void grpc_metadata_array_init(grpc_metadata_array* array) override; + + void grpc_metadata_array_destroy(grpc_metadata_array* array) override; + + void assert_fail(const char* failed_assertion) override; + + Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) override; + + Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) override; +}; + +} // namespace grpc diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc new file mode 100644 index 0000000000..a16601de5d --- /dev/null +++ b/src/cpp/util/string_ref.cc @@ -0,0 +1,40 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#include + +namespace grpc { + +const size_t string_ref::npos = size_t(-1); + +} // namespace grpc diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index b70dcccd17..25a7816844 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -628,13 +628,13 @@ extern gpr_stats_inc_type gpr_stats_inc_import; typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c); extern gpr_stats_read_type gpr_stats_read_import; #define gpr_stats_read gpr_stats_read_import -typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); +typedef static inline gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); extern gpr_time_0_type gpr_time_0_import; #define gpr_time_0 gpr_time_0_import -typedef gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); +typedef static inline gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); extern gpr_inf_future_type gpr_inf_future_import; #define gpr_inf_future gpr_inf_future_import -typedef gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); +typedef static inline gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); extern gpr_inf_past_type gpr_inf_past_import; #define gpr_inf_past gpr_inf_past_import typedef void(*gpr_time_init_type)(void); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index b972f60fc3..17834e3938 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -628,13 +628,13 @@ extern gpr_stats_inc_type gpr_stats_inc_import; typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c); extern gpr_stats_read_type gpr_stats_read_import; #define gpr_stats_read gpr_stats_read_import -typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); +typedef static inline gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); extern gpr_time_0_type gpr_time_0_import; #define gpr_time_0 gpr_time_0_import -typedef gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); +typedef static inline gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); extern gpr_inf_future_type gpr_inf_future_import; #define gpr_inf_future gpr_inf_future_import -typedef gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); +typedef static inline gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); extern gpr_inf_past_type gpr_inf_past_import; #define gpr_inf_past gpr_inf_past_import typedef void(*gpr_time_init_type)(void); diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 05c3b4fb4b..e63c9ae696 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -840,6 +840,7 @@ src/cpp/server/server_credentials.cc \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ +src/cpp/util/string_ref.cc \ src/cpp/util/time.cc # This tag can be used to specify the character encoding of the source files diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 277f59f77d..a17f60d8f2 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5062,6 +5062,7 @@ "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", + "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc" ], "third_party": false, @@ -5165,7 +5166,8 @@ "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h" + "include/grpc/impl/codegen/time.h", + "src/cpp/codegen/codegen_init.cc" ], "third_party": false, "type": "lib" @@ -5354,6 +5356,7 @@ "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", + "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc" ], "third_party": false, diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index c15d9508ad..be7e91f4a5 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -371,6 +371,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index e986377748..f0e10b10a7 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -88,6 +88,9 @@ src\cpp\util + + src\cpp\util + src\cpp\util diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 6210c914a0..88c394757e 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -194,7 +194,7 @@ - + diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index 9803bbb9d1..8264435fb1 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -1,5 +1,10 @@ + + + src\cpp\codegen + + include\grpc++\impl\codegen @@ -163,6 +168,15 @@ {311586c5-1a08-e1ba-8dd8-d1cbe10156b3} + + {e9bdb195-1cf9-a0f4-231c-fcee59eb54ca} + + + {d2e57ea3-c758-0f7c-3bc9-e71dd87bd654} + + + {f93ade18-7c50-7ed9-b8e7-383b11f077c2} + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index a66823f7a8..138fd004ed 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -354,6 +354,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 4ccea5bc69..9f08b76c7b 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -67,6 +67,9 @@ src\cpp\util + + src\cpp\util + src\cpp\util -- cgit v1.2.3 From 723af534197c66ab7888db51f08456a0b79a9ea7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 14:26:50 -0800 Subject: moved some files around --- BUILD | 4 +- Makefile | 8 +- build.yaml | 4 +- include/grpc++/impl/grpc_library.h | 2 +- src/cpp/codegen/core_codegen.cc | 253 ----------------------- src/cpp/codegen/core_codegen.h | 70 ------- src/cpp/codegen/grpc_library.cc | 40 ---- src/cpp/common/core_codegen.cc | 251 ++++++++++++++++++++++ src/cpp/common/core_codegen.h | 70 +++++++ src/cpp/common/grpc_library.cc | 42 ++++ tools/doxygen/Doxyfile.c++.internal | 4 +- tools/run_tests/sources_and_headers.json | 4 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 6 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 13 +- 14 files changed, 384 insertions(+), 387 deletions(-) delete mode 100644 src/cpp/codegen/core_codegen.cc delete mode 100644 src/cpp/codegen/core_codegen.h delete mode 100644 src/cpp/codegen/grpc_library.cc create mode 100644 src/cpp/common/core_codegen.cc create mode 100644 src/cpp/common/core_codegen.h create mode 100644 src/cpp/common/grpc_library.cc diff --git a/BUILD b/BUILD index 6ebc094a08..a7bcd01398 100644 --- a/BUILD +++ b/BUILD @@ -796,9 +796,9 @@ cc_library( "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", "src/cpp/client/secure_credentials.cc", - "src/cpp/codegen/core_codegen.cc", - "src/cpp/codegen/grpc_library.cc", "src/cpp/common/auth_property_iterator.cc", + "src/cpp/common/core_codegen.cc", + "src/cpp/common/grpc_library.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", diff --git a/Makefile b/Makefile index e9a31b2e29..f2713c100d 100644 --- a/Makefile +++ b/Makefile @@ -3014,9 +3014,9 @@ endif LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ - src/cpp/codegen/core_codegen.cc \ - src/cpp/codegen/grpc_library.cc \ src/cpp/common/auth_property_iterator.cc \ + src/cpp/common/core_codegen.cc \ + src/cpp/common/grpc_library.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ @@ -13147,9 +13147,9 @@ src/core/tsi/fake_transport_security.c: $(OPENSSL_DEP) src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP) src/core/tsi/transport_security.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) -src/cpp/codegen/core_codegen.cc: $(OPENSSL_DEP) -src/cpp/codegen/grpc_library.cc: $(OPENSSL_DEP) src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) +src/cpp/common/core_codegen.cc: $(OPENSSL_DEP) +src/cpp/common/grpc_library.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP) src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index a53da04fee..5323915bb6 100644 --- a/build.yaml +++ b/build.yaml @@ -695,9 +695,9 @@ libs: - src/cpp/server/secure_server_credentials.h src: - src/cpp/client/secure_credentials.cc - - src/cpp/codegen/core_codegen.cc - - src/cpp/codegen/grpc_library.cc - src/cpp/common/auth_property_iterator.cc + - src/cpp/common/core_codegen.cc + - src/cpp/common/grpc_library.cc - src/cpp/common/secure_auth_context.cc - src/cpp/common/secure_channel_arguments.cc - src/cpp/common/secure_create_auth_context.cc diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h index 207053e63b..9d32ec152f 100644 --- a/include/grpc++/impl/grpc_library.h +++ b/include/grpc++/impl/grpc_library.h @@ -40,7 +40,7 @@ #include #include -#include "src/cpp/codegen/core_codegen.h" +#include "src/cpp/common/core_codegen.h" namespace grpc { diff --git a/src/cpp/codegen/core_codegen.cc b/src/cpp/codegen/core_codegen.cc deleted file mode 100644 index b052cc60eb..0000000000 --- a/src/cpp/codegen/core_codegen.cc +++ /dev/null @@ -1,253 +0,0 @@ -/* - * - * 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. - * - */ - -#include "src/cpp/codegen/core_codegen.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "src/core/profiling/timers.h" - -grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; - -namespace { - -const int kGrpcBufferWriterMaxBufferLength = 8192; - -class GrpcBufferWriter GRPC_FINAL - : public ::grpc::protobuf::io::ZeroCopyOutputStream { - public: - explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size) - : block_size_(block_size), byte_count_(0), have_backup_(false) { - *bp = grpc_raw_byte_buffer_create(NULL, 0); - slice_buffer_ = &(*bp)->data.raw.slice_buffer; - } - - ~GrpcBufferWriter() GRPC_OVERRIDE { - if (have_backup_) { - gpr_slice_unref(backup_slice_); - } - } - - bool Next(void** data, int* size) GRPC_OVERRIDE { - if (have_backup_) { - slice_ = backup_slice_; - have_backup_ = false; - } else { - slice_ = gpr_slice_malloc(block_size_); - } - *data = GPR_SLICE_START_PTR(slice_); - // On win x64, int is only 32bit - GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - gpr_slice_buffer_add(slice_buffer_, slice_); - return true; - } - - void BackUp(int count) GRPC_OVERRIDE { - gpr_slice_buffer_pop(slice_buffer_); - if (count == block_size_) { - backup_slice_ = slice_; - } else { - backup_slice_ = - gpr_slice_split_tail(&slice_, GPR_SLICE_LENGTH(slice_) - count); - gpr_slice_buffer_add(slice_buffer_, slice_); - } - have_backup_ = true; - byte_count_ -= count; - } - - grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; } - - private: - const int block_size_; - int64_t byte_count_; - gpr_slice_buffer* slice_buffer_; - bool have_backup_; - gpr_slice backup_slice_; - gpr_slice slice_; -}; - -class GrpcBufferReader GRPC_FINAL - : public ::grpc::protobuf::io::ZeroCopyInputStream { - public: - explicit GrpcBufferReader(grpc_byte_buffer* buffer) - : byte_count_(0), backup_count_(0) { - grpc_byte_buffer_reader_init(&reader_, buffer); - } - ~GrpcBufferReader() GRPC_OVERRIDE { - grpc_byte_buffer_reader_destroy(&reader_); - } - - bool Next(const void** data, int* size) GRPC_OVERRIDE { - if (backup_count_ > 0) { - *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - - backup_count_; - GPR_ASSERT(backup_count_ <= INT_MAX); - *size = (int)backup_count_; - backup_count_ = 0; - return true; - } - if (!grpc_byte_buffer_reader_next(&reader_, &slice_)) { - return false; - } - gpr_slice_unref(slice_); - *data = GPR_SLICE_START_PTR(slice_); - // On win x64, int is only 32bit - GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - return true; - } - - void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } - - bool Skip(int count) GRPC_OVERRIDE { - const void* data; - int size; - while (Next(&data, &size)) { - if (size >= count) { - BackUp(size - count); - return true; - } - // size < count; - count -= size; - } - // error or we have too large count; - return false; - } - - grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { - return byte_count_ - backup_count_; - } - - private: - int64_t byte_count_; - int64_t backup_count_; - grpc_byte_buffer_reader reader_; - gpr_slice slice_; -}; -} // namespace - -namespace grpc { - -grpc_completion_queue* CoreCodegen::grpc_completion_queue_create( - void* reserved) { - return ::grpc_completion_queue_create(reserved); -} - -void CoreCodegen::grpc_completion_queue_destroy(grpc_completion_queue* cq) { - ::grpc_completion_queue_destroy(cq); -} - -grpc_event CoreCodegen::grpc_completion_queue_pluck(grpc_completion_queue* cq, - void* tag, - gpr_timespec deadline, - void* reserved) { - return ::grpc_completion_queue_pluck(cq, tag, deadline, reserved); -} - -void* CoreCodegen::gpr_malloc(size_t size) { return ::gpr_malloc(size); } - -void CoreCodegen::gpr_free(void* p) { return ::gpr_free(p); } - -void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) { - ::grpc_byte_buffer_destroy(bb); -} - -void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { - ::grpc_metadata_array_init(array); -} - -void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { - ::grpc_metadata_array_destroy(array); -} - -void CoreCodegen::assert_fail(const char* failed_assertion) { - gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); - abort(); -} - -Status CoreCodegen::SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) { - GPR_TIMER_SCOPE("SerializeProto", 0); - int byte_size = msg.ByteSize(); - if (byte_size <= kGrpcBufferWriterMaxBufferLength) { - gpr_slice slice = gpr_slice_malloc(byte_size); - GPR_ASSERT(GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); - *bp = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); - return Status::OK; - } else { - GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); - return msg.SerializeToZeroCopyStream(&writer) - ? Status::OK - : Status(StatusCode::INTERNAL, "Failed to serialize message"); - } -} - -Status CoreCodegen::DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) { - GPR_TIMER_SCOPE("DeserializeProto", 0); - if (buffer == nullptr) { - return Status(StatusCode::INTERNAL, "No payload"); - } - GrpcBufferReader reader(buffer); - ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_message_size > 0) { - decoder.SetTotalBytesLimit(max_message_size, max_message_size); - } - if (!msg->ParseFromCodedStream(&decoder)) { - grpc_byte_buffer_destroy(buffer); - return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); - } - if (!decoder.ConsumedEntireMessage()) { - grpc_byte_buffer_destroy(buffer); - return Status(StatusCode::INTERNAL, "Did not read entire message"); - } - grpc_byte_buffer_destroy(buffer); - return Status::OK; -} - -} // namespace grpc diff --git a/src/cpp/codegen/core_codegen.h b/src/cpp/codegen/core_codegen.h deleted file mode 100644 index b591209427..0000000000 --- a/src/cpp/codegen/core_codegen.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * 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. - * - */ - -#include -#include -#include - -namespace grpc { - -class CoreCodegen : public CoreCodegenInterface { - private: - grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; - - void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; - - grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, - gpr_timespec deadline, - void* reserved) override; - - void* gpr_malloc(size_t size) override; - - void gpr_free(void* p) override; - - void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; - - void grpc_metadata_array_init(grpc_metadata_array* array) override; - - void grpc_metadata_array_destroy(grpc_metadata_array* array) override; - - void assert_fail(const char* failed_assertion) override; - - Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) override; - - Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) override; -}; - -} // namespace grpc diff --git a/src/cpp/codegen/grpc_library.cc b/src/cpp/codegen/grpc_library.cc deleted file mode 100644 index 48acec3f3d..0000000000 --- a/src/cpp/codegen/grpc_library.cc +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * 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. - * - */ - -#include - -namespace grpc { - -GrpcLibraryInterface *g_glip = nullptr; - -} // namespace grpc diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc new file mode 100644 index 0000000000..0f7028f34c --- /dev/null +++ b/src/cpp/common/core_codegen.cc @@ -0,0 +1,251 @@ +/* + * + * 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. + * + */ + +#include "src/cpp/common/core_codegen.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/profiling/timers.h" + +namespace { + +const int kGrpcBufferWriterMaxBufferLength = 8192; + +class GrpcBufferWriter GRPC_FINAL + : public ::grpc::protobuf::io::ZeroCopyOutputStream { + public: + explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size) + : block_size_(block_size), byte_count_(0), have_backup_(false) { + *bp = grpc_raw_byte_buffer_create(NULL, 0); + slice_buffer_ = &(*bp)->data.raw.slice_buffer; + } + + ~GrpcBufferWriter() GRPC_OVERRIDE { + if (have_backup_) { + gpr_slice_unref(backup_slice_); + } + } + + bool Next(void** data, int* size) GRPC_OVERRIDE { + if (have_backup_) { + slice_ = backup_slice_; + have_backup_ = false; + } else { + slice_ = gpr_slice_malloc(block_size_); + } + *data = GPR_SLICE_START_PTR(slice_); + // On win x64, int is only 32bit + GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + gpr_slice_buffer_add(slice_buffer_, slice_); + return true; + } + + void BackUp(int count) GRPC_OVERRIDE { + gpr_slice_buffer_pop(slice_buffer_); + if (count == block_size_) { + backup_slice_ = slice_; + } else { + backup_slice_ = + gpr_slice_split_tail(&slice_, GPR_SLICE_LENGTH(slice_) - count); + gpr_slice_buffer_add(slice_buffer_, slice_); + } + have_backup_ = true; + byte_count_ -= count; + } + + grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; } + + private: + const int block_size_; + int64_t byte_count_; + gpr_slice_buffer* slice_buffer_; + bool have_backup_; + gpr_slice backup_slice_; + gpr_slice slice_; +}; + +class GrpcBufferReader GRPC_FINAL + : public ::grpc::protobuf::io::ZeroCopyInputStream { + public: + explicit GrpcBufferReader(grpc_byte_buffer* buffer) + : byte_count_(0), backup_count_(0) { + grpc_byte_buffer_reader_init(&reader_, buffer); + } + ~GrpcBufferReader() GRPC_OVERRIDE { + grpc_byte_buffer_reader_destroy(&reader_); + } + + bool Next(const void** data, int* size) GRPC_OVERRIDE { + if (backup_count_ > 0) { + *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - + backup_count_; + GPR_ASSERT(backup_count_ <= INT_MAX); + *size = (int)backup_count_; + backup_count_ = 0; + return true; + } + if (!grpc_byte_buffer_reader_next(&reader_, &slice_)) { + return false; + } + gpr_slice_unref(slice_); + *data = GPR_SLICE_START_PTR(slice_); + // On win x64, int is only 32bit + GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + return true; + } + + void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } + + bool Skip(int count) GRPC_OVERRIDE { + const void* data; + int size; + while (Next(&data, &size)) { + if (size >= count) { + BackUp(size - count); + return true; + } + // size < count; + count -= size; + } + // error or we have too large count; + return false; + } + + grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { + return byte_count_ - backup_count_; + } + + private: + int64_t byte_count_; + int64_t backup_count_; + grpc_byte_buffer_reader reader_; + gpr_slice slice_; +}; +} // namespace + +namespace grpc { + +grpc_completion_queue* CoreCodegen::grpc_completion_queue_create( + void* reserved) { + return ::grpc_completion_queue_create(reserved); +} + +void CoreCodegen::grpc_completion_queue_destroy(grpc_completion_queue* cq) { + ::grpc_completion_queue_destroy(cq); +} + +grpc_event CoreCodegen::grpc_completion_queue_pluck(grpc_completion_queue* cq, + void* tag, + gpr_timespec deadline, + void* reserved) { + return ::grpc_completion_queue_pluck(cq, tag, deadline, reserved); +} + +void* CoreCodegen::gpr_malloc(size_t size) { return ::gpr_malloc(size); } + +void CoreCodegen::gpr_free(void* p) { return ::gpr_free(p); } + +void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) { + ::grpc_byte_buffer_destroy(bb); +} + +void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { + ::grpc_metadata_array_init(array); +} + +void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { + ::grpc_metadata_array_destroy(array); +} + +void CoreCodegen::assert_fail(const char* failed_assertion) { + gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); + abort(); +} + +Status CoreCodegen::SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) { + GPR_TIMER_SCOPE("SerializeProto", 0); + int byte_size = msg.ByteSize(); + if (byte_size <= kGrpcBufferWriterMaxBufferLength) { + gpr_slice slice = gpr_slice_malloc(byte_size); + GPR_ASSERT(GPR_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + *bp = grpc_raw_byte_buffer_create(&slice, 1); + gpr_slice_unref(slice); + return Status::OK; + } else { + GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); + return msg.SerializeToZeroCopyStream(&writer) + ? Status::OK + : Status(StatusCode::INTERNAL, "Failed to serialize message"); + } +} + +Status CoreCodegen::DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) { + GPR_TIMER_SCOPE("DeserializeProto", 0); + if (buffer == nullptr) { + return Status(StatusCode::INTERNAL, "No payload"); + } + GrpcBufferReader reader(buffer); + ::grpc::protobuf::io::CodedInputStream decoder(&reader); + if (max_message_size > 0) { + decoder.SetTotalBytesLimit(max_message_size, max_message_size); + } + if (!msg->ParseFromCodedStream(&decoder)) { + grpc_byte_buffer_destroy(buffer); + return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); + } + if (!decoder.ConsumedEntireMessage()) { + grpc_byte_buffer_destroy(buffer); + return Status(StatusCode::INTERNAL, "Did not read entire message"); + } + grpc_byte_buffer_destroy(buffer); + return Status::OK; +} + +} // namespace grpc diff --git a/src/cpp/common/core_codegen.h b/src/cpp/common/core_codegen.h new file mode 100644 index 0000000000..b591209427 --- /dev/null +++ b/src/cpp/common/core_codegen.h @@ -0,0 +1,70 @@ +/* + * + * 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. + * + */ + +#include +#include +#include + +namespace grpc { + +class CoreCodegen : public CoreCodegenInterface { + private: + grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; + + void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; + + grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, + gpr_timespec deadline, + void* reserved) override; + + void* gpr_malloc(size_t size) override; + + void gpr_free(void* p) override; + + void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; + + void grpc_metadata_array_init(grpc_metadata_array* array) override; + + void grpc_metadata_array_destroy(grpc_metadata_array* array) override; + + void assert_fail(const char* failed_assertion) override; + + Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) override; + + Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) override; +}; + +} // namespace grpc diff --git a/src/cpp/common/grpc_library.cc b/src/cpp/common/grpc_library.cc new file mode 100644 index 0000000000..445a76e9ae --- /dev/null +++ b/src/cpp/common/grpc_library.cc @@ -0,0 +1,42 @@ +/* + * + * 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. + * + */ + +#include +#include + +namespace grpc { + +GrpcLibraryInterface *g_glip = nullptr; +CoreCodegenInterface *g_core_codegen_interface = nullptr; + +} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index e63c9ae696..6a41c801df 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -812,9 +812,9 @@ src/cpp/common/create_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ src/cpp/client/secure_credentials.cc \ -src/cpp/codegen/core_codegen.cc \ -src/cpp/codegen/grpc_library.cc \ src/cpp/common/auth_property_iterator.cc \ +src/cpp/common/core_codegen.cc \ +src/cpp/common/grpc_library.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index a17f60d8f2..491af56c84 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5036,12 +5036,12 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", - "src/cpp/codegen/core_codegen.cc", - "src/cpp/codegen/grpc_library.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", "src/cpp/common/create_auth_context.h", + "src/cpp/common/grpc_library.cc", "src/cpp/common/rpc_method.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_auth_context.h", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index be7e91f4a5..374bbfca1b 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -315,11 +315,11 @@ - + - + - + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index f0e10b10a7..5cb395a668 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -4,13 +4,13 @@ src\cpp\client - - src\cpp\codegen + + src\cpp\common - - src\cpp\codegen + + src\cpp\common - + src\cpp\common @@ -281,9 +281,6 @@ {7febf32a-d7a6-76fa-9e17-f189f591c062} - - {3c3e27f4-d3d9-3c42-5204-08b5e839f2de} - {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} -- cgit v1.2.3 From 057a0a2033e9a8b194b7e1dc747f094edee5eae6 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 15:23:08 -0800 Subject: fixed wrong refactoring --- src/cpp/common/core_codegen.cc | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index 0f7028f34c..2c1c11c7a4 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -231,21 +231,22 @@ Status CoreCodegen::DeserializeProto(grpc_byte_buffer* buffer, if (buffer == nullptr) { return Status(StatusCode::INTERNAL, "No payload"); } - GrpcBufferReader reader(buffer); - ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_message_size > 0) { - decoder.SetTotalBytesLimit(max_message_size, max_message_size); - } - if (!msg->ParseFromCodedStream(&decoder)) { - grpc_byte_buffer_destroy(buffer); - return Status(StatusCode::INTERNAL, msg->InitializationErrorString()); - } - if (!decoder.ConsumedEntireMessage()) { - grpc_byte_buffer_destroy(buffer); - return Status(StatusCode::INTERNAL, "Did not read entire message"); + Status result = Status::OK; + { + GrpcBufferReader reader(buffer); + ::grpc::protobuf::io::CodedInputStream decoder(&reader); + if (max_message_size > 0) { + decoder.SetTotalBytesLimit(max_message_size, max_message_size); + } + if (!msg->ParseFromCodedStream(&decoder)) { + result = Status(StatusCode::INTERNAL, msg->InitializationErrorString()); + } + if (!decoder.ConsumedEntireMessage()) { + result = Status(StatusCode::INTERNAL, "Did not read entire message"); + } } grpc_byte_buffer_destroy(buffer); - return Status::OK; + return result; } } // namespace grpc -- cgit v1.2.3 From ef6848fe5b98e607b376c3f3b235ff393ef0e59b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 16:05:30 -0800 Subject: reverted gpr_ time changes --- .../grpc++/impl/codegen/core_codegen_interface.h | 2 ++ include/grpc/impl/codegen/time.h | 31 +++------------------- src/core/support/time.c | 24 +++++++++++++++++ src/cpp/common/core_codegen.cc | 5 ++++ src/cpp/common/core_codegen.h | 2 ++ 5 files changed, 37 insertions(+), 27 deletions(-) diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index a27c1f8057..8a5c74df6e 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -74,6 +74,8 @@ class CoreCodegenInterface { virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; + virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0; + virtual void assert_fail(const char* failed_assertion) = 0; }; diff --git a/include/grpc/impl/codegen/time.h b/include/grpc/impl/codegen/time.h index 9776dabc11..c22bedfe77 100644 --- a/include/grpc/impl/codegen/time.h +++ b/include/grpc/impl/codegen/time.h @@ -69,33 +69,10 @@ typedef struct gpr_timespec { } gpr_timespec; /* Time constants. */ -/* The zero time interval. */ -GPRAPI static inline gpr_timespec gpr_time_0(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = 0; - out.tv_nsec = 0; - out.clock_type = type; - return out; -} - -/* The far future */ -GPRAPI static inline gpr_timespec gpr_inf_future(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = INT64_MAX; - out.tv_nsec = 0; - out.clock_type = type; - return out; -} - -/* The far past. */ -GPRAPI static inline gpr_timespec gpr_inf_past(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = INT64_MIN; - out.tv_nsec = 0; - out.clock_type = type; - return out; -} - +GPRAPI gpr_timespec +gpr_time_0(gpr_clock_type type); /* The zero time interval. */ +GPRAPI gpr_timespec gpr_inf_future(gpr_clock_type type); /* The far future */ +GPRAPI gpr_timespec gpr_inf_past(gpr_clock_type type); /* The far past. */ #define GPR_MS_PER_SEC 1000 #define GPR_US_PER_SEC 1000000 diff --git a/src/core/support/time.c b/src/core/support/time.c index fec3c7a2c5..423d12ffc0 100644 --- a/src/core/support/time.c +++ b/src/core/support/time.c @@ -56,6 +56,30 @@ gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b) { return gpr_time_cmp(a, b) > 0 ? a : b; } +gpr_timespec gpr_time_0(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = 0; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +gpr_timespec gpr_inf_future(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = INT64_MAX; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +gpr_timespec gpr_inf_past(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = INT64_MIN; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + /* TODO(ctiller): consider merging _nanos, _micros, _millis into a single function for maintainability. Similarly for _seconds, _minutes, and _hours */ diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index 2c1c11c7a4..9b8ff5d30c 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -200,6 +200,11 @@ void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { ::grpc_metadata_array_destroy(array); } + +gpr_timespec CoreCodegen::gpr_inf_future(gpr_clock_type type) { + return ::gpr_inf_future(type); +} + void CoreCodegen::assert_fail(const char* failed_assertion) { gpr_log(GPR_ERROR, "assertion failed: %s", failed_assertion); abort(); diff --git a/src/cpp/common/core_codegen.h b/src/cpp/common/core_codegen.h index b591209427..e0e26a8573 100644 --- a/src/cpp/common/core_codegen.h +++ b/src/cpp/common/core_codegen.h @@ -57,6 +57,8 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_metadata_array_destroy(grpc_metadata_array* array) override; + void gpr_inf_future(gpr_clock_type type) override; + void assert_fail(const char* failed_assertion) override; Status SerializeProto(const grpc::protobuf::Message& msg, -- cgit v1.2.3 From 1b48da1f0f478c9067aae110eb90d3a1f2b22e29 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 8 Mar 2016 16:20:31 -0800 Subject: fix formatting of sublists --- tools/run_tests/stress_test/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md index 9f3cae28a3..397e241cf7 100644 --- a/tools/run_tests/stress_test/README.md +++ b/tools/run_tests/stress_test/README.md @@ -14,10 +14,10 @@ 3. Create a Project from the [GCP console](https://console.cloud.google.com) 4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). 5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click ‘Create Container Cluster’ and follow the instructions. -5.1. The instructions for Name/Zone/MachineType etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) -5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. -5.3. **IMPORTANT**: Before hitting the "Create" button, click on “More” link just above the "Create" button and Select "Enabled" for BigQuery , "Enabled" for Cloud Platform and "Read/Write" for Cloud User Accounts. -5.4. Create the cluster by clicking "Create" button. + 5.1. The instructions for Name/Zone/MachineType etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) + 5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. + 5.3. **IMPORTANT**: Before hitting the "Create" button, click on “More” link just above the "Create" button and Select "Enabled" for BigQuery , "Enabled" for Cloud Platform and "Read/Write" for Cloud User Accounts. + 5.4. Create the cluster by clicking "Create" button. #### *On your machine* (or the machine from which stress tests on GKE are launched): 1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions at https://github.com/grpc/grpc/blob/master/INSTALL.md -- cgit v1.2.3 From be25493398367bfe39a2639873c6872fbb870ed8 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 16:24:35 -0800 Subject: codegen interface usage of gpr_inf_future --- include/grpc++/impl/codegen/completion_queue.h | 6 +++--- src/cpp/common/core_codegen.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 6473494d86..fff72b05a9 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -133,8 +133,8 @@ class CompletionQueue : private GrpcLibrary { /// /// \return true if read a regular event, false if the queue is shutting down. bool Next(void** tag, bool* ok) { - return (AsyncNextInternal(tag, ok, gpr_inf_future(GPR_CLOCK_REALTIME)) != - SHUTDOWN); + return (AsyncNextInternal(tag, ok, g_core_codegen_interface->gpr_inf_future( + GPR_CLOCK_REALTIME)) != SHUTDOWN); } /// Request the shutdown of the queue. @@ -191,7 +191,7 @@ class CompletionQueue : private GrpcLibrary { /// Wraps \a grpc_completion_queue_pluck. /// \warning Must not be mixed with calls to \a Next. bool Pluck(CompletionQueueTag* tag) { - auto deadline = gpr_inf_future(GPR_CLOCK_REALTIME); + auto deadline = g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME); auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( cq_, tag, deadline, nullptr); bool ok = ev.success != 0; diff --git a/src/cpp/common/core_codegen.h b/src/cpp/common/core_codegen.h index e0e26a8573..fc54b0848f 100644 --- a/src/cpp/common/core_codegen.h +++ b/src/cpp/common/core_codegen.h @@ -57,7 +57,7 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_metadata_array_destroy(grpc_metadata_array* array) override; - void gpr_inf_future(gpr_clock_type type) override; + gpr_timespec gpr_inf_future(gpr_clock_type type) override; void assert_fail(const char* failed_assertion) override; -- cgit v1.2.3 From b942640497611a360e1c60084e73810fc07a3c1b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 16:25:11 -0800 Subject: clang-format --- include/grpc++/impl/codegen/async_stream.h | 10 ++++--- include/grpc++/impl/codegen/async_unary_call.h | 9 ++++-- include/grpc++/impl/codegen/call.h | 21 +++++++------- include/grpc++/impl/codegen/client_unary_call.h | 5 ++-- include/grpc++/impl/codegen/completion_queue.h | 5 ++-- .../grpc++/impl/codegen/core_codegen_interface.h | 14 +++++----- include/grpc++/impl/codegen/grpc_library.h | 10 +++---- include/grpc++/impl/codegen/impl/async_stream.h | 10 ++++--- include/grpc++/impl/codegen/method_handler_impl.h | 32 ++++++++++++++-------- include/grpc++/impl/codegen/proto_utils.h | 11 ++++---- include/grpc++/impl/codegen/server_interface.h | 9 +++--- include/grpc++/impl/codegen/service_type.h | 14 ++++++---- include/grpc++/impl/codegen/sync_stream.h | 6 ++-- src/cpp/codegen/codegen_init.cc | 2 +- src/cpp/common/core_codegen.cc | 1 - src/cpp/common/grpc_library.cc | 2 +- test/cpp/codegen/codegen_test.cc | 3 +- test/cpp/interop/reconnect_interop_server.cc | 10 +++---- 18 files changed, 98 insertions(+), 76 deletions(-) diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index 8b6047a4a3..cac345e0dc 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -34,11 +34,11 @@ #ifndef GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H #define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H +#include #include #include -#include -#include #include +#include #include namespace grpc { @@ -215,7 +215,8 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { CallOpSet write_ops_; CallOpSet writes_done_ops_; CallOpSet finish_ops_; + CallOpClientRecvStatus> + finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -350,7 +351,8 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet meta_ops_; CallOpSet> read_ops_; CallOpSet finish_ops_; + CallOpServerSendStatus> + finish_ops_; }; template diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index 9c6dbd5484..1526debf54 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -101,10 +101,12 @@ class ClientAsyncResponseReader GRPC_FINAL class CallOpSetCollection : public CallOpSetCollectionInterface { public: SneakyCallOpSet init_buf_; + CallOpClientSendClose> + init_buf_; CallOpSet meta_buf_; CallOpSet, - CallOpClientRecvStatus> finish_buf_; + CallOpClientRecvStatus> + finish_buf_; }; std::shared_ptr collection_; }; @@ -159,7 +161,8 @@ class ServerAsyncResponseWriter GRPC_FINAL ServerContext* ctx_; CallOpSet meta_buf_; CallOpSet finish_buf_; + CallOpServerSendStatus> + finish_buf_; }; } // namespace grpc diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index ec950b8ea6..50f5a75191 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -34,13 +34,11 @@ #ifndef GRPCXX_IMPL_CODEGEN_CALL_H #define GRPCXX_IMPL_CODEGEN_CALL_H +#include #include -#include #include -#include +#include -#include -#include #include #include #include @@ -49,6 +47,8 @@ #include #include #include +#include +#include struct grpc_byte_buffer; @@ -280,7 +280,8 @@ class CallOpRecvMessage { if (*status) { got_message = true; *status = SerializationTraits::Deserialize(recv_buf_, message_, - max_message_size).ok(); + max_message_size) + .ok(); } else { got_message = false; g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); @@ -606,14 +607,14 @@ class Call GRPC_FINAL { public: /* call is owned by the caller */ Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) - : call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} + : call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq, int max_message_size) - : call_hook_(call_hook), - cq_(cq), - call_(call), - max_message_size_(max_message_size) {} + : call_hook_(call_hook), + cq_(cq), + call_(call), + max_message_size_(max_message_size) {} void PerformOps(CallOpSetInterface* ops) { if (max_message_size_ > 0) { diff --git a/include/grpc++/impl/codegen/client_unary_call.h b/include/grpc++/impl/codegen/client_unary_call.h index 0f7c5ec90c..6c35a95765 100644 --- a/include/grpc++/impl/codegen/client_unary_call.h +++ b/include/grpc++/impl/codegen/client_unary_call.h @@ -36,8 +36,8 @@ #include #include -#include #include +#include #include namespace grpc { @@ -56,7 +56,8 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, Call call(channel->CreateCall(method, context, &cq)); CallOpSet, - CallOpClientSendClose, CallOpClientRecvStatus> ops; + CallOpClientSendClose, CallOpClientRecvStatus> + ops; Status status = ops.SendMessage(request); if (!status.ok()) { return status; diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index fff72b05a9..889990d1a0 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -36,12 +36,12 @@ #ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H -#include #include #include #include #include #include +#include struct grpc_completion_queue; @@ -191,7 +191,8 @@ class CompletionQueue : private GrpcLibrary { /// Wraps \a grpc_completion_queue_pluck. /// \warning Must not be mixed with calls to \a Next. bool Pluck(CompletionQueueTag* tag) { - auto deadline = g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME); + auto deadline = + g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME); auto ev = g_core_codegen_interface->grpc_completion_queue_pluck( cq_, tag, deadline, nullptr); bool ok = ev.success != 0; diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 8a5c74df6e..860c773907 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -35,9 +35,9 @@ #ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H -#include -#include #include +#include +#include namespace grpc { @@ -80,11 +80,11 @@ class CoreCodegenInterface { }; /* XXX */ -#define GPR_CODEGEN_ASSERT(x) \ - do { \ - if (!(x)) { \ - grpc::g_core_codegen_interface->assert_fail(#x); \ - } \ +#define GPR_CODEGEN_ASSERT(x) \ + do { \ + if (!(x)) { \ + grpc::g_core_codegen_interface->assert_fail(#x); \ + } \ } while (0) } // namespace grpc diff --git a/include/grpc++/impl/codegen/grpc_library.h b/include/grpc++/impl/codegen/grpc_library.h index ef076315f5..02f9039131 100644 --- a/include/grpc++/impl/codegen/grpc_library.h +++ b/include/grpc++/impl/codegen/grpc_library.h @@ -34,8 +34,8 @@ #ifndef GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H #define GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H -#include #include +#include namespace grpc { @@ -51,14 +51,14 @@ class GrpcLibrary { public: GrpcLibrary() { GPR_CODEGEN_ASSERT(g_glip && - "gRPC library not initialized. See " - "grpc::internal::GrpcLibraryInitializer."); + "gRPC library not initialized. See " + "grpc::internal::GrpcLibraryInitializer."); g_glip->init(); } virtual ~GrpcLibrary() { GPR_CODEGEN_ASSERT(g_glip && - "gRPC library not initialized. See " - "grpc::internal::GrpcLibraryInitializer."); + "gRPC library not initialized. See " + "grpc::internal::GrpcLibraryInitializer."); g_glip->shutdown(); } }; diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h index fea935a362..cac345e0dc 100644 --- a/include/grpc++/impl/codegen/impl/async_stream.h +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -34,11 +34,11 @@ #ifndef GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H #define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H -#include #include +#include #include -#include #include +#include #include namespace grpc { @@ -215,7 +215,8 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { CallOpSet write_ops_; CallOpSet writes_done_ops_; CallOpSet finish_ops_; + CallOpClientRecvStatus> + finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -350,7 +351,8 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet meta_ops_; CallOpSet> read_ops_; CallOpSet finish_ops_; + CallOpServerSendStatus> + finish_ops_; }; template diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 3ecca0a406..7a1201bcc9 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -44,10 +44,10 @@ namespace grpc { template class RpcMethodHandler : public MethodHandler { public: - RpcMethodHandler( - std::function func, - ServiceType* service) + RpcMethodHandler(std::function + func, + ServiceType* service) : func_(func), service_(service) {} void RunHandler(const HandlerParameter& param) GRPC_FINAL { @@ -61,7 +61,8 @@ class RpcMethodHandler : public MethodHandler { GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet ops; + CallOpServerSendStatus> + ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -74,7 +75,8 @@ class RpcMethodHandler : public MethodHandler { private: // Application provided rpc handler function. std::function func_; + ResponseType*)> + func_; // The class the above handler function lives in. ServiceType* service_; }; @@ -85,7 +87,8 @@ class ClientStreamingHandler : public MethodHandler { public: ClientStreamingHandler( std::function*, ResponseType*)> func, + ServerReader*, ResponseType*)> + func, ServiceType* service) : func_(func), service_(service) {} @@ -96,7 +99,8 @@ class ClientStreamingHandler : public MethodHandler { GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet ops; + CallOpServerSendStatus> + ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -108,7 +112,8 @@ class ClientStreamingHandler : public MethodHandler { private: std::function*, - ResponseType*)> func_; + ResponseType*)> + func_; ServiceType* service_; }; @@ -118,7 +123,8 @@ class ServerStreamingHandler : public MethodHandler { public: ServerStreamingHandler( std::function*)> func, + ServerWriter*)> + func, ServiceType* service) : func_(func), service_(service) {} @@ -143,7 +149,8 @@ class ServerStreamingHandler : public MethodHandler { private: std::function*)> func_; + ServerWriter*)> + func_; ServiceType* service_; }; @@ -174,7 +181,8 @@ class BidiStreamingHandler : public MethodHandler { private: std::function*)> func_; + ServerReaderWriter*)> + func_; ServiceType* service_; }; diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 8903a4412e..f77f8eebb3 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -36,12 +36,12 @@ #include -#include -#include -#include #include -#include #include +#include +#include +#include +#include namespace grpc { @@ -59,7 +59,8 @@ class SerializationTraitsDeserializeProto(buffer, msg, max_message_size); + return g_core_codegen_interface->DeserializeProto(buffer, msg, + max_message_size); } }; diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h index 1dcc01285a..908d124df1 100644 --- a/include/grpc++/impl/codegen/server_interface.h +++ b/include/grpc++/impl/codegen/server_interface.h @@ -34,11 +34,11 @@ #ifndef GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H #define GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H -#include #include #include #include #include +#include namespace grpc { @@ -192,10 +192,11 @@ class ServerInterface : public CallHook { bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { bool serialization_status = *status && payload_ && - SerializationTraits::Deserialize( - payload_, request_, server_->max_message_size()).ok(); + SerializationTraits::Deserialize(payload_, request_, + server_->max_message_size()) + .ok(); bool ret = RegisteredAsyncRequest::FinalizeResult(tag, status); - *status = serialization_status&&* status; + *status = serialization_status && *status; return ret; } diff --git a/include/grpc++/impl/codegen/service_type.h b/include/grpc++/impl/codegen/service_type.h index 901468e3ee..faf189314c 100644 --- a/include/grpc++/impl/codegen/service_type.h +++ b/include/grpc++/impl/codegen/service_type.h @@ -132,16 +132,18 @@ class Service { void AddMethod(RpcServiceMethod* method) { methods_.emplace_back(method); } void MarkMethodAsync(int index) { - GPR_CODEGEN_ASSERT(methods_[index].get() != nullptr && - "Cannot mark the method as 'async' because it has already been " - "marked as 'generic'."); + GPR_CODEGEN_ASSERT( + methods_[index].get() != nullptr && + "Cannot mark the method as 'async' because it has already been " + "marked as 'generic'."); methods_[index]->ResetHandler(); } void MarkMethodGeneric(int index) { - GPR_CODEGEN_ASSERT(methods_[index]->handler() != nullptr && - "Cannot mark the method as 'generic' because it has already been " - "marked as 'async'."); + GPR_CODEGEN_ASSERT( + methods_[index]->handler() != nullptr && + "Cannot mark the method as 'generic' because it has already been " + "marked as 'async'."); methods_[index].reset(); } diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 5f878469ce..0eabc5fc0f 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -123,7 +123,8 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface { ClientContext* context, const W& request) : context_(context), call_(channel->CreateCall(method, context, &cq_)) { CallOpSet ops; + CallOpClientSendClose> + ops; ops.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert GPR_CODEGEN_ASSERT(ops.SendMessage(request).ok()); @@ -235,7 +236,8 @@ class ClientWriter : public ClientWriterInterface { private: ClientContext* context_; CallOpSet finish_ops_; + CallOpClientRecvStatus> + finish_ops_; CompletionQueue cq_; Call call_; }; diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc index 99b6c9c04e..917f1bb541 100644 --- a/src/cpp/codegen/codegen_init.cc +++ b/src/cpp/codegen/codegen_init.cc @@ -34,5 +34,5 @@ #include #include -grpc::CoreCodegenInterface *grpc::g_core_codegen_interface = nullptr; +grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index 9b8ff5d30c..45e9e278a0 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -200,7 +200,6 @@ void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { ::grpc_metadata_array_destroy(array); } - gpr_timespec CoreCodegen::gpr_inf_future(gpr_clock_type type) { return ::gpr_inf_future(type); } diff --git a/src/cpp/common/grpc_library.cc b/src/cpp/common/grpc_library.cc index 445a76e9ae..72be4e41a5 100644 --- a/src/cpp/common/grpc_library.cc +++ b/src/cpp/common/grpc_library.cc @@ -31,8 +31,8 @@ * */ -#include #include +#include namespace grpc { diff --git a/test/cpp/codegen/codegen_test.cc b/test/cpp/codegen/codegen_test.cc index 23d9a5f9a0..735755a5d0 100644 --- a/test/cpp/codegen/codegen_test.cc +++ b/test/cpp/codegen/codegen_test.cc @@ -38,8 +38,7 @@ namespace { class CodegenTest : public ::testing::Test {}; -TEST_F(CodegenTest, Build) { -} +TEST_F(CodegenTest, Build) {} } // namespace } // namespace grpc diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index 41cff430ae..1f9147d0ef 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -42,17 +42,17 @@ #include #include -#include -#include #include #include #include +#include +#include -#include "test/core/util/reconnect_server.h" -#include "test/cpp/util/test_config.h" -#include "src/proto/grpc/testing/test.grpc.pb.h" #include "src/proto/grpc/testing/empty.grpc.pb.h" #include "src/proto/grpc/testing/messages.grpc.pb.h" +#include "src/proto/grpc/testing/test.grpc.pb.h" +#include "test/core/util/reconnect_server.h" +#include "test/cpp/util/test_config.h" DEFINE_int32(control_port, 0, "Server port for controlling the server."); DEFINE_int32(retry_port, 0, -- cgit v1.2.3 From 1b634717ffc90a4ff4647d6e9477a4b8de167146 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 16:27:31 -0800 Subject: copyright --- src/cpp/util/string_ref.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/util/string_ref.cc b/src/cpp/util/string_ref.cc index a16601de5d..b55019b5f2 100644 --- a/src/cpp/util/string_ref.cc +++ b/src/cpp/util/string_ref.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 -- cgit v1.2.3 From f349c1bb908ef258eb609594c29cab5a3b83e06f Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 16:28:16 -0800 Subject: codegen_test build.yaml fixes --- build.yaml | 1 + src/python/grpcio/grpc/_cython/imports.generated.h | 6 +++--- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 +++--- tools/run_tests/tests.json | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.yaml b/build.yaml index 5323915bb6..3493294ea1 100644 --- a/build.yaml +++ b/build.yaml @@ -2098,6 +2098,7 @@ targets: - gpr_test_util - gpr - name: codegen_test + gtest: true build: test language: c++ src: diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 25a7816844..b70dcccd17 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -628,13 +628,13 @@ extern gpr_stats_inc_type gpr_stats_inc_import; typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c); extern gpr_stats_read_type gpr_stats_read_import; #define gpr_stats_read gpr_stats_read_import -typedef static inline gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); +typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); extern gpr_time_0_type gpr_time_0_import; #define gpr_time_0 gpr_time_0_import -typedef static inline gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); +typedef gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); extern gpr_inf_future_type gpr_inf_future_import; #define gpr_inf_future gpr_inf_future_import -typedef static inline gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); +typedef gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); extern gpr_inf_past_type gpr_inf_past_import; #define gpr_inf_past gpr_inf_past_import typedef void(*gpr_time_init_type)(void); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 17834e3938..b972f60fc3 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -628,13 +628,13 @@ extern gpr_stats_inc_type gpr_stats_inc_import; typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c); extern gpr_stats_read_type gpr_stats_read_import; #define gpr_stats_read gpr_stats_read_import -typedef static inline gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); +typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); extern gpr_time_0_type gpr_time_0_import; #define gpr_time_0 gpr_time_0_import -typedef static inline gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); +typedef gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); extern gpr_inf_future_type gpr_inf_future_import; #define gpr_inf_future gpr_inf_future_import -typedef static inline gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); +typedef gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); extern gpr_inf_past_type gpr_inf_past_import; #define gpr_inf_past gpr_inf_past_import typedef void(*gpr_time_init_type)(void); diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 02a63b3727..dd29a576a9 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1988,7 +1988,7 @@ "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, - "gtest": false, + "gtest": true, "language": "c++", "name": "codegen_test", "platforms": [ -- cgit v1.2.3 From 60ee8dd2fc6c3e417389059957cda0732bcb9037 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 17:21:42 -0800 Subject: docstrings --- include/grpc++/alarm.h | 2 +- include/grpc++/channel.h | 2 +- include/grpc++/impl/codegen/completion_queue.h | 2 +- .../grpc++/impl/codegen/core_codegen_interface.h | 37 ++++++++++++---------- include/grpc++/impl/codegen/grpc_library.h | 11 ++++--- include/grpc++/impl/grpc_library.h | 2 +- include/grpc++/security/credentials.h | 4 +-- include/grpc++/server.h | 2 +- src/cpp/client/secure_credentials.cc | 16 +++++----- src/cpp/codegen/codegen_init.cc | 6 ++++ src/cpp/common/core_codegen.h | 21 ++++++------ src/cpp/common/grpc_library.cc | 3 ++ 12 files changed, 62 insertions(+), 46 deletions(-) diff --git a/include/grpc++/alarm.h b/include/grpc++/alarm.h index 3b8104d135..764837a958 100644 --- a/include/grpc++/alarm.h +++ b/include/grpc++/alarm.h @@ -50,7 +50,7 @@ namespace grpc { class CompletionQueue; /// A thin wrapper around \a grpc_alarm (see / \a / src/core/surface/alarm.h). -class Alarm : private GrpcLibrary { +class Alarm : private GrpcLibraryCodegen { public: /// Create a completion queue alarm instance associated to \a cq. /// diff --git a/include/grpc++/channel.h b/include/grpc++/channel.h index 80547f7ab8..679d473204 100644 --- a/include/grpc++/channel.h +++ b/include/grpc++/channel.h @@ -49,7 +49,7 @@ namespace grpc { class Channel GRPC_FINAL : public ChannelInterface, public CallHook, public std::enable_shared_from_this, - private GrpcLibrary { + private GrpcLibraryCodegen { public: ~Channel(); diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 889990d1a0..fdea88e6e3 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -83,7 +83,7 @@ extern CoreCodegenInterface* g_core_codegen_interface; /// A thin wrapper around \a grpc_completion_queue (see / \a /// src/core/surface/completion_queue.h). -class CompletionQueue : private GrpcLibrary { +class CompletionQueue : private GrpcLibraryCodegen { public: /// Default constructor. Implicitly creates a \a grpc_completion_queue /// instance. diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 860c773907..a23031fe65 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -31,7 +31,6 @@ * */ -/// XXX #ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H @@ -41,20 +40,15 @@ namespace grpc { -class CoreCodegenInterface; - -extern CoreCodegenInterface* g_core_codegen_interface; - +/// Interface between the codegen library and the minimal subset of core +/// features required by the generated code. +/// +/// All undocumented methods are simply forwarding the call to their namesakes. +/// Please refer to their corresponding documentation for details. +/// +/// \warning This interface should be considered internal and private. class CoreCodegenInterface { public: - virtual grpc_completion_queue* grpc_completion_queue_create( - void* reserved) = 0; - virtual void grpc_completion_queue_destroy(grpc_completion_queue* cq) = 0; - virtual grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, - void* tag, - gpr_timespec deadline, - void* reserved) = 0; - // Serialize the msg into a buffer created inside the function. The caller // should destroy the returned buffer when done with it. If serialization // fails, @@ -67,6 +61,17 @@ class CoreCodegenInterface { grpc::protobuf::Message* msg, int max_message_size) = 0; + /// Upon a failed assertion, log the error. + virtual void assert_fail(const char* failed_assertion) = 0; + + virtual grpc_completion_queue* grpc_completion_queue_create( + void* reserved) = 0; + virtual void grpc_completion_queue_destroy(grpc_completion_queue* cq) = 0; + virtual grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, + void* tag, + gpr_timespec deadline, + void* reserved) = 0; + virtual void* gpr_malloc(size_t size) = 0; virtual void gpr_free(void* p) = 0; @@ -75,11 +80,11 @@ class CoreCodegenInterface { virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0; - - virtual void assert_fail(const char* failed_assertion) = 0; }; -/* XXX */ +extern CoreCodegenInterface* g_core_codegen_interface; + +/// Codegen specific version of \a GPR_ASSERT. #define GPR_CODEGEN_ASSERT(x) \ do { \ if (!(x)) { \ diff --git a/include/grpc++/impl/codegen/grpc_library.h b/include/grpc++/impl/codegen/grpc_library.h index 02f9039131..3cdc6f3f7c 100644 --- a/include/grpc++/impl/codegen/grpc_library.h +++ b/include/grpc++/impl/codegen/grpc_library.h @@ -45,17 +45,20 @@ class GrpcLibraryInterface { virtual void shutdown() = 0; }; +/// Initialized by \a grpc::GrpcLibraryInitializer from +/// extern GrpcLibraryInterface* g_glip; -class GrpcLibrary { +/// Classes that require gRPC to be initialized should inherit from this class. +class GrpcLibraryCodegen { public: - GrpcLibrary() { + GrpcLibraryCodegen() { GPR_CODEGEN_ASSERT(g_glip && "gRPC library not initialized. See " "grpc::internal::GrpcLibraryInitializer."); g_glip->init(); } - virtual ~GrpcLibrary() { + virtual ~GrpcLibraryCodegen() { GPR_CODEGEN_ASSERT(g_glip && "gRPC library not initialized. See " "grpc::internal::GrpcLibraryInitializer."); @@ -65,4 +68,4 @@ class GrpcLibrary { } // namespace grpc -#endif // GRPCXX_IMPL_GRPC_LIBRARY_H +#endif // GRPCXX_IMPL_CODEGEN_GRPC_LIBRARY_H diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h index 9d32ec152f..d26f4a4cab 100644 --- a/include/grpc++/impl/grpc_library.h +++ b/include/grpc++/impl/grpc_library.h @@ -48,13 +48,13 @@ namespace internal { class GrpcLibrary GRPC_FINAL : public GrpcLibraryInterface { public: void init() GRPC_OVERRIDE { grpc_init(); } - void shutdown() GRPC_OVERRIDE { grpc_shutdown(); } }; static GrpcLibrary g_gli; static CoreCodegen g_core_codegen; +/// Instantiating this class ensures the proper initialization of gRPC. class GrpcLibraryInitializer GRPC_FINAL { public: GrpcLibraryInitializer() { diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index e0806c0b7b..f2e2efd7a6 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -57,7 +57,7 @@ class SecureCallCredentials; /// for all the calls on that channel. /// /// \see http://www.grpc.io/docs/guides/auth.html -class ChannelCredentials : private GrpcLibrary { +class ChannelCredentials : private GrpcLibraryCodegen { public: ChannelCredentials(); ~ChannelCredentials(); @@ -83,7 +83,7 @@ class ChannelCredentials : private GrpcLibrary { /// authenticate with a server for a given call on a channel. /// /// \see http://www.grpc.io/docs/guides/auth.html -class CallCredentials : private GrpcLibrary { +class CallCredentials : private GrpcLibraryCodegen { public: CallCredentials(); ~CallCredentials(); diff --git a/include/grpc++/server.h b/include/grpc++/server.h index c177805236..9eb8c287e1 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -62,7 +62,7 @@ class ThreadPoolInterface; /// Models a gRPC server. /// /// Servers are configured and started via \a grpc::ServerBuilder. -class Server GRPC_FINAL : public ServerInterface, private GrpcLibrary { +class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { public: ~Server(); diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index 074dae7ca7..308455527c 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -83,14 +83,14 @@ std::shared_ptr WrapCallCredentials( } // namespace std::shared_ptr GoogleDefaultCredentials() { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapChannelCredentials(grpc_google_default_credentials_create()); } // Builds SSL Credentials given SSL specific options std::shared_ptr SslCredentials( const SslCredentialsOptions& options) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). grpc_ssl_pem_key_cert_pair pem_key_cert_pair = { options.pem_private_key.c_str(), options.pem_cert_chain.c_str()}; @@ -102,7 +102,7 @@ std::shared_ptr SslCredentials( // Builds credentials for use when running in GCE std::shared_ptr GoogleComputeEngineCredentials() { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials( grpc_google_compute_engine_credentials_create(nullptr)); } @@ -110,7 +110,7 @@ std::shared_ptr GoogleComputeEngineCredentials() { // Builds JWT credentials. std::shared_ptr ServiceAccountJWTAccessCredentials( const grpc::string& json_key, long token_lifetime_seconds) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). if (token_lifetime_seconds <= 0) { gpr_log(GPR_ERROR, "Trying to create JWTCredentials with non-positive lifetime"); @@ -125,7 +125,7 @@ std::shared_ptr ServiceAccountJWTAccessCredentials( // Builds refresh token credentials. std::shared_ptr GoogleRefreshTokenCredentials( const grpc::string& json_refresh_token) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials(grpc_google_refresh_token_credentials_create( json_refresh_token.c_str(), nullptr)); } @@ -133,7 +133,7 @@ std::shared_ptr GoogleRefreshTokenCredentials( // Builds access token credentials. std::shared_ptr AccessTokenCredentials( const grpc::string& access_token) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials( grpc_access_token_credentials_create(access_token.c_str(), nullptr)); } @@ -142,7 +142,7 @@ std::shared_ptr AccessTokenCredentials( std::shared_ptr GoogleIAMCredentials( const grpc::string& authorization_token, const grpc::string& authority_selector) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials(grpc_google_iam_credentials_create( authorization_token.c_str(), authority_selector.c_str(), nullptr)); } @@ -224,7 +224,7 @@ MetadataCredentialsPluginWrapper::MetadataCredentialsPluginWrapper( std::shared_ptr MetadataCredentialsFromPlugin( std::unique_ptr plugin) { - GrpcLibrary init; // To call grpc_init(). + GrpcLibraryCodegen init; // To call grpc_init(). const char* type = plugin->GetType(); MetadataCredentialsPluginWrapper* wrapper = new MetadataCredentialsPluginWrapper(std::move(plugin)); diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc index 917f1bb541..37abbad2da 100644 --- a/src/cpp/codegen/codegen_init.cc +++ b/src/cpp/codegen/codegen_init.cc @@ -34,5 +34,11 @@ #include #include +/// Initializes the global gRPC variables for the codegen library. These will +/// stay null in the absence of of grpc++ library. In this case, no gRPC +/// features such as the ability to perform calls will be available. Trying to +/// perform them would result in a segmentation fault when trying to deference +/// the following nulled globals. + grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; diff --git a/src/cpp/common/core_codegen.h b/src/cpp/common/core_codegen.h index fc54b0848f..0d8c6b79f7 100644 --- a/src/cpp/common/core_codegen.h +++ b/src/cpp/common/core_codegen.h @@ -31,42 +31,41 @@ * */ +// This file should be compiled as part of grpc++. + #include #include #include namespace grpc { +/// Implementation of the core codegen interface. class CoreCodegen : public CoreCodegenInterface { private: - grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; + Status SerializeProto(const grpc::protobuf::Message& msg, + grpc_byte_buffer** bp) override; - void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; + Status DeserializeProto(grpc_byte_buffer* buffer, + grpc::protobuf::Message* msg, + int max_message_size) override; + grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; + void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, gpr_timespec deadline, void* reserved) override; void* gpr_malloc(size_t size) override; - void gpr_free(void* p) override; void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; void grpc_metadata_array_init(grpc_metadata_array* array) override; - void grpc_metadata_array_destroy(grpc_metadata_array* array) override; gpr_timespec gpr_inf_future(gpr_clock_type type) override; void assert_fail(const char* failed_assertion) override; - - Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) override; - - Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) override; }; } // namespace grpc diff --git a/src/cpp/common/grpc_library.cc b/src/cpp/common/grpc_library.cc index 72be4e41a5..c08b8f81f3 100644 --- a/src/cpp/common/grpc_library.cc +++ b/src/cpp/common/grpc_library.cc @@ -34,6 +34,9 @@ #include #include +/// Definition of gRPC's globals. These should be associated with actual +/// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable. + namespace grpc { GrpcLibraryInterface *g_glip = nullptr; -- cgit v1.2.3 From 9eef37786531faa30ca51def84daa3e950c7e1a7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 9 Mar 2016 11:31:02 -0800 Subject: clang-format --- include/grpc++/impl/codegen/async_stream.h | 6 ++--- include/grpc++/impl/codegen/async_unary_call.h | 9 +++---- include/grpc++/impl/codegen/call.h | 3 +-- include/grpc++/impl/codegen/client_unary_call.h | 3 +-- include/grpc++/impl/codegen/impl/async_stream.h | 6 ++--- include/grpc++/impl/codegen/method_handler_impl.h | 32 +++++++++-------------- include/grpc++/impl/codegen/server_interface.h | 7 +++-- include/grpc++/impl/codegen/sync_stream.h | 6 ++--- 8 files changed, 26 insertions(+), 46 deletions(-) diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index cac345e0dc..8f9afe8251 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -215,8 +215,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { CallOpSet write_ops_; CallOpSet writes_done_ops_; CallOpSet - finish_ops_; + CallOpClientRecvStatus> finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -351,8 +350,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet meta_ops_; CallOpSet> read_ops_; CallOpSet - finish_ops_; + CallOpServerSendStatus> finish_ops_; }; template diff --git a/include/grpc++/impl/codegen/async_unary_call.h b/include/grpc++/impl/codegen/async_unary_call.h index 1526debf54..9c6dbd5484 100644 --- a/include/grpc++/impl/codegen/async_unary_call.h +++ b/include/grpc++/impl/codegen/async_unary_call.h @@ -101,12 +101,10 @@ class ClientAsyncResponseReader GRPC_FINAL class CallOpSetCollection : public CallOpSetCollectionInterface { public: SneakyCallOpSet - init_buf_; + CallOpClientSendClose> init_buf_; CallOpSet meta_buf_; CallOpSet, - CallOpClientRecvStatus> - finish_buf_; + CallOpClientRecvStatus> finish_buf_; }; std::shared_ptr collection_; }; @@ -161,8 +159,7 @@ class ServerAsyncResponseWriter GRPC_FINAL ServerContext* ctx_; CallOpSet meta_buf_; CallOpSet - finish_buf_; + CallOpServerSendStatus> finish_buf_; }; } // namespace grpc diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 50f5a75191..03affc2125 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -280,8 +280,7 @@ class CallOpRecvMessage { if (*status) { got_message = true; *status = SerializationTraits::Deserialize(recv_buf_, message_, - max_message_size) - .ok(); + max_message_size).ok(); } else { got_message = false; g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); diff --git a/include/grpc++/impl/codegen/client_unary_call.h b/include/grpc++/impl/codegen/client_unary_call.h index 6c35a95765..a2b7d928c3 100644 --- a/include/grpc++/impl/codegen/client_unary_call.h +++ b/include/grpc++/impl/codegen/client_unary_call.h @@ -56,8 +56,7 @@ Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method, Call call(channel->CreateCall(method, context, &cq)); CallOpSet, - CallOpClientSendClose, CallOpClientRecvStatus> - ops; + CallOpClientSendClose, CallOpClientRecvStatus> ops; Status status = ops.SendMessage(request); if (!status.ok()) { return status; diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h index cac345e0dc..8f9afe8251 100644 --- a/include/grpc++/impl/codegen/impl/async_stream.h +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -215,8 +215,7 @@ class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface { CallOpSet write_ops_; CallOpSet writes_done_ops_; CallOpSet - finish_ops_; + CallOpClientRecvStatus> finish_ops_; }; /// Client-side interface for asynchronous bi-directional streaming. @@ -351,8 +350,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, CallOpSet meta_ops_; CallOpSet> read_ops_; CallOpSet - finish_ops_; + CallOpServerSendStatus> finish_ops_; }; template diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index 7a1201bcc9..3ecca0a406 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -44,10 +44,10 @@ namespace grpc { template class RpcMethodHandler : public MethodHandler { public: - RpcMethodHandler(std::function - func, - ServiceType* service) + RpcMethodHandler( + std::function func, + ServiceType* service) : func_(func), service_(service) {} void RunHandler(const HandlerParameter& param) GRPC_FINAL { @@ -61,8 +61,7 @@ class RpcMethodHandler : public MethodHandler { GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet - ops; + CallOpServerSendStatus> ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -75,8 +74,7 @@ class RpcMethodHandler : public MethodHandler { private: // Application provided rpc handler function. std::function - func_; + ResponseType*)> func_; // The class the above handler function lives in. ServiceType* service_; }; @@ -87,8 +85,7 @@ class ClientStreamingHandler : public MethodHandler { public: ClientStreamingHandler( std::function*, ResponseType*)> - func, + ServerReader*, ResponseType*)> func, ServiceType* service) : func_(func), service_(service) {} @@ -99,8 +96,7 @@ class ClientStreamingHandler : public MethodHandler { GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_); CallOpSet - ops; + CallOpServerSendStatus> ops; ops.SendInitialMetadata(param.server_context->initial_metadata_); if (status.ok()) { status = ops.SendMessage(rsp); @@ -112,8 +108,7 @@ class ClientStreamingHandler : public MethodHandler { private: std::function*, - ResponseType*)> - func_; + ResponseType*)> func_; ServiceType* service_; }; @@ -123,8 +118,7 @@ class ServerStreamingHandler : public MethodHandler { public: ServerStreamingHandler( std::function*)> - func, + ServerWriter*)> func, ServiceType* service) : func_(func), service_(service) {} @@ -149,8 +143,7 @@ class ServerStreamingHandler : public MethodHandler { private: std::function*)> - func_; + ServerWriter*)> func_; ServiceType* service_; }; @@ -181,8 +174,7 @@ class BidiStreamingHandler : public MethodHandler { private: std::function*)> - func_; + ServerReaderWriter*)> func_; ServiceType* service_; }; diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h index 908d124df1..7d4ed277ed 100644 --- a/include/grpc++/impl/codegen/server_interface.h +++ b/include/grpc++/impl/codegen/server_interface.h @@ -192,11 +192,10 @@ class ServerInterface : public CallHook { bool FinalizeResult(void** tag, bool* status) GRPC_OVERRIDE { bool serialization_status = *status && payload_ && - SerializationTraits::Deserialize(payload_, request_, - server_->max_message_size()) - .ok(); + SerializationTraits::Deserialize( + payload_, request_, server_->max_message_size()).ok(); bool ret = RegisteredAsyncRequest::FinalizeResult(tag, status); - *status = serialization_status && *status; + *status = serialization_status&&* status; return ret; } diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 0eabc5fc0f..5f878469ce 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -123,8 +123,7 @@ class ClientReader GRPC_FINAL : public ClientReaderInterface { ClientContext* context, const W& request) : context_(context), call_(channel->CreateCall(method, context, &cq_)) { CallOpSet - ops; + CallOpClientSendClose> ops; ops.SendInitialMetadata(context->send_initial_metadata_); // TODO(ctiller): don't assert GPR_CODEGEN_ASSERT(ops.SendMessage(request).ok()); @@ -236,8 +235,7 @@ class ClientWriter : public ClientWriterInterface { private: ClientContext* context_; CallOpSet - finish_ops_; + CallOpClientRecvStatus> finish_ops_; CompletionQueue cq_; Call call_; }; -- cgit v1.2.3 From 79d9096126aceb3fbf5a9ef0c2942b5d17276851 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 9 Mar 2016 13:57:46 -0800 Subject: removed spurious grpc_library.cc --- BUILD | 4 +- Makefile | 2 - build.yaml | 3 +- src/cpp/codegen/codegen_init.cc | 7 +++- src/cpp/common/grpc_library.cc | 45 ---------------------- tools/doxygen/Doxyfile.c++.internal | 3 +- tools/run_tests/sources_and_headers.json | 7 +++- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 4 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 9 +++-- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 1 + .../grpc++_unsecure.vcxproj.filters | 3 ++ 11 files changed, 31 insertions(+), 57 deletions(-) delete mode 100644 src/cpp/common/grpc_library.cc diff --git a/BUILD b/BUILD index a7bcd01398..00620b6c66 100644 --- a/BUILD +++ b/BUILD @@ -789,16 +789,17 @@ cc_library( name = "grpc++", srcs = [ "src/cpp/client/secure_credentials.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/secure_auth_context.h", "src/cpp/server/secure_server_credentials.h", "src/cpp/client/create_channel_internal.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", "src/cpp/client/secure_credentials.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/core_codegen.cc", - "src/cpp/common/grpc_library.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", @@ -890,6 +891,7 @@ cc_library( name = "grpc++_unsecure", srcs = [ "src/cpp/client/create_channel_internal.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", diff --git a/Makefile b/Makefile index f2713c100d..28130f35cf 100644 --- a/Makefile +++ b/Makefile @@ -3016,7 +3016,6 @@ LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/core_codegen.cc \ - src/cpp/common/grpc_library.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ @@ -13149,7 +13148,6 @@ src/core/tsi/transport_security.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) src/cpp/common/core_codegen.cc: $(OPENSSL_DEP) -src/cpp/common/grpc_library.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP) src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 3493294ea1..e128a43989 100644 --- a/build.yaml +++ b/build.yaml @@ -173,6 +173,7 @@ filegroups: - include/grpc++/support/time.h headers: - src/cpp/client/create_channel_internal.h + - src/cpp/common/core_codegen.h - src/cpp/common/create_auth_context.h - src/cpp/server/dynamic_thread_pool.h - src/cpp/server/thread_pool_interface.h @@ -691,13 +692,13 @@ libs: language: c++ headers: - src/cpp/client/secure_credentials.h + - src/cpp/common/core_codegen.h - src/cpp/common/secure_auth_context.h - src/cpp/server/secure_server_credentials.h src: - src/cpp/client/secure_credentials.cc - src/cpp/common/auth_property_iterator.cc - src/cpp/common/core_codegen.cc - - src/cpp/common/grpc_library.cc - src/cpp/common/secure_auth_context.cc - src/cpp/common/secure_channel_arguments.cc - src/cpp/common/secure_create_auth_context.cc diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc index 37abbad2da..f9f9adea21 100644 --- a/src/cpp/codegen/codegen_init.cc +++ b/src/cpp/codegen/codegen_init.cc @@ -38,7 +38,12 @@ /// stay null in the absence of of grpc++ library. In this case, no gRPC /// features such as the ability to perform calls will be available. Trying to /// perform them would result in a segmentation fault when trying to deference -/// the following nulled globals. +/// the following nulled globals. These should be associated with actual +/// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable. + +namespace grpc { grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; + +} // namespace grpc diff --git a/src/cpp/common/grpc_library.cc b/src/cpp/common/grpc_library.cc deleted file mode 100644 index c08b8f81f3..0000000000 --- a/src/cpp/common/grpc_library.cc +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * 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. - * - */ - -#include -#include - -/// Definition of gRPC's globals. These should be associated with actual -/// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable. - -namespace grpc { - -GrpcLibraryInterface *g_glip = nullptr; -CoreCodegenInterface *g_core_codegen_interface = nullptr; - -} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 6a41c801df..554fcecb36 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -805,16 +805,17 @@ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ src/cpp/client/secure_credentials.h \ +src/cpp/common/core_codegen.h \ src/cpp/common/secure_auth_context.h \ src/cpp/server/secure_server_credentials.h \ src/cpp/client/create_channel_internal.h \ +src/cpp/common/core_codegen.h \ src/cpp/common/create_auth_context.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/core_codegen.cc \ -src/cpp/common/grpc_library.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 491af56c84..d09811a036 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4973,6 +4973,8 @@ "include/grpc++/support/time.h", "src/cpp/client/create_channel_internal.h", "src/cpp/client/secure_credentials.h", + "src/cpp/common/core_codegen.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/common/secure_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", @@ -5040,8 +5042,9 @@ "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/core_codegen.cc", + "src/cpp/common/core_codegen.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", - "src/cpp/common/grpc_library.cc", "src/cpp/common/rpc_method.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_auth_context.h", @@ -5279,6 +5282,7 @@ "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", "src/cpp/client/create_channel_internal.h", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h" @@ -5340,6 +5344,7 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/common/rpc_method.cc", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 374bbfca1b..4e97f9cdd1 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -305,9 +305,11 @@ + + @@ -319,8 +321,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 5cb395a668..1ebc06f1f2 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -10,9 +10,6 @@ src\cpp\common - - src\cpp\common - src\cpp\common @@ -233,6 +230,9 @@ src\cpp\client + + src\cpp\common + src\cpp\common @@ -242,6 +242,9 @@ src\cpp\client + + src\cpp\common + src\cpp\common diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 138fd004ed..550fa153e4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -305,6 +305,7 @@ + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 9f08b76c7b..dbf5c7c181 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -212,6 +212,9 @@ src\cpp\client + + src\cpp\common + src\cpp\common -- cgit v1.2.3 From aca123316b321eaa03f98b8c25cbf6e25298a8e3 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 9 Mar 2016 23:56:54 -0800 Subject: removed spurious namespace qualification --- src/cpp/codegen/codegen_init.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc index f9f9adea21..c5d22124b7 100644 --- a/src/cpp/codegen/codegen_init.cc +++ b/src/cpp/codegen/codegen_init.cc @@ -41,9 +41,5 @@ /// the following nulled globals. These should be associated with actual /// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable. -namespace grpc { - grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; - -} // namespace grpc -- cgit v1.2.3 From 8ec33f0b65f1ea3a2ad177e4b00542e9c92c3e1b Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 2 Feb 2016 17:44:55 -0800 Subject: Add intial plaform support for Native Client (NaCl) The initial port to NaCl was done in the webports repository: https://chromium.googlesource.com/webports.git/+/master/ports/grpc/ In order to be buildable under NaCl outside the webports repo there are several further changes that will be needed: 1. Make AF_UNIX sockets optional 2. Make IP_PKTINFO optional 3. Make vector I/O (readv/writev) optional --- include/grpc/impl/codegen/port_platform.h | 35 ++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 92569043fc..fd55cb4582 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -247,8 +247,41 @@ #else /* _LP64 */ #define GPR_ARCH_32 1 #endif /* _LP64 */ +#elif defined(__native_client__) +#define GPR_PLATFORM_STRING "nacl" +#ifndef _BSD_SOURCE +#define _BSD_SOURCE +#endif +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE +#endif +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#define GPR_CPU_POSIX 1 +#define GPR_GCC_ATOMIC 1 +#define GPR_GCC_TLS 1 +#define GPR_POSIX_LOG 1 +#define GPR_POSIX_MULTIPOLL_WITH_POLL 1 +#define GPR_POSIX_WAKEUP_FD 1 +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_ENV 1 +#define GPR_POSIX_FILE 1 +#define GPR_POSIX_STRING 1 +#define GPR_POSIX_SUBPROCESS 1 +#define GPR_POSIX_SYNC 1 +#define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 +#ifdef _LP64 +#define GPR_ARCH_64 1 +#else /* _LP64 */ +#define GPR_ARCH_32 1 +#endif /* _LP64 */ #else -#error Could not auto-detect platform +#error "Could not auto-detect platform" #endif #endif /* GPR_NO_AUTODETECT_PLATFORM */ -- cgit v1.2.3 From 28c0809ffc83841d4f6fa006bead96687af64571 Mon Sep 17 00:00:00 2001 From: Adele Zhou Date: Tue, 15 Mar 2016 14:08:28 -0700 Subject: chmod g+x --- tools/jenkins/run_full_interop.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/jenkins/run_full_interop.sh diff --git a/tools/jenkins/run_full_interop.sh b/tools/jenkins/run_full_interop.sh old mode 100644 new mode 100755 -- cgit v1.2.3 From 4e5c6d9895ada358be79a5412e2064f963d91db7 Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 15 Mar 2016 15:34:59 -0700 Subject: Remove end2end_certs library. --- Makefile | 150 +++++++------------ test/core/end2end/gen_build_yaml.py | 13 -- tools/run_tests/sources_and_headers.json | 32 ---- vsprojects/buildtests_c.sln | 34 ----- .../end2end/end2end_certs/end2end_certs.vcxproj | 166 --------------------- .../end2end_certs/end2end_certs.vcxproj.filters | 30 ---- .../fixtures/h2_census_test/h2_census_test.vcxproj | 3 - .../h2_compress_test/h2_compress_test.vcxproj | 3 - .../h2_fakesec_test/h2_fakesec_test.vcxproj | 3 - .../fixtures/h2_full_test/h2_full_test.vcxproj | 3 - .../fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj | 3 - .../fixtures/h2_proxy_test/h2_proxy_test.vcxproj | 3 - .../h2_sockpair+trace_test.vcxproj | 3 - .../h2_sockpair_1byte_test.vcxproj | 3 - .../h2_sockpair_test/h2_sockpair_test.vcxproj | 3 - .../h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj | 3 - .../fixtures/h2_ssl_test/h2_ssl_test.vcxproj | 3 - .../h2_uchannel_test/h2_uchannel_test.vcxproj | 3 - .../tests/end2end_tests/end2end_tests.vcxproj | 3 - 19 files changed, 55 insertions(+), 409 deletions(-) delete mode 100644 vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj delete mode 100644 vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters diff --git a/Makefile b/Makefile index f118d54253..eb85c04a15 100644 --- a/Makefile +++ b/Makefile @@ -1122,7 +1122,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc @@ -5655,46 +5655,6 @@ ifneq ($(NO_DEPS),true) endif -LIBEND2END_CERTS_SRC = \ - test/core/end2end/data/test_root_cert.c \ - test/core/end2end/data/server1_cert.c \ - test/core/end2end/data/server1_key.c \ - - -LIBEND2END_CERTS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_CERTS_SRC)))) - - -ifeq ($(NO_SECURE),true) - -# You can't build secure libraries if you don't have OpenSSL. - -$(LIBDIR)/$(CONFIG)/libend2end_certs.a: openssl_dep_error - - -else - - -$(LIBDIR)/$(CONFIG)/libend2end_certs.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBEND2END_CERTS_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_certs.a - $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBEND2END_CERTS_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libend2end_certs.a -endif - - - - -endif - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(LIBEND2END_CERTS_OBJS:.o=.dep) -endif -endif - - # All of the test targets, and protoc plugins @@ -12289,14 +12249,14 @@ else -$(BINDIR)/$(CONFIG)/h2_census_test: $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_census_test: $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_census_test + $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_census_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_census_test: $(H2_CENSUS_TEST_OBJS:.o=.dep) @@ -12321,14 +12281,14 @@ else -$(BINDIR)/$(CONFIG)/h2_compress_test: $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_compress_test: $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_compress_test + $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_compress_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_compress_test: $(H2_COMPRESS_TEST_OBJS:.o=.dep) @@ -12353,14 +12313,14 @@ else -$(BINDIR)/$(CONFIG)/h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fakesec_test + $(Q) $(LD) $(LDFLAGS) $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fakesec_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fakesec.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fakesec.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS:.o=.dep) @@ -12385,14 +12345,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full_test: $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full_test: $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full_test: $(H2_FULL_TEST_OBJS:.o=.dep) @@ -12417,14 +12377,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS:.o=.dep) @@ -12449,14 +12409,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full+poll_test: $(H2_FULL+POLL_TEST_OBJS:.o=.dep) @@ -12481,14 +12441,14 @@ else -$(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test + $(Q) $(LD) $(LDFLAGS) $(H2_FULL+POLL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+poll+pipe_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+poll+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_full+poll+pipe_test: $(H2_FULL+POLL+PIPE_TEST_OBJS:.o=.dep) @@ -12513,14 +12473,14 @@ else -$(BINDIR)/$(CONFIG)/h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_oauth2_test + $(Q) $(LD) $(LDFLAGS) $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_oauth2_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_oauth2.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_oauth2.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS:.o=.dep) @@ -12545,14 +12505,14 @@ else -$(BINDIR)/$(CONFIG)/h2_proxy_test: $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_proxy_test: $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_proxy_test + $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_proxy_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_proxy_test: $(H2_PROXY_TEST_OBJS:.o=.dep) @@ -12577,14 +12537,14 @@ else -$(BINDIR)/$(CONFIG)/h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_test + $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS:.o=.dep) @@ -12609,14 +12569,14 @@ else -$(BINDIR)/$(CONFIG)/h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test + $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS:.o=.dep) @@ -12641,14 +12601,14 @@ else -$(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test + $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS:.o=.dep) @@ -12673,14 +12633,14 @@ else -$(BINDIR)/$(CONFIG)/h2_ssl_test: $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_ssl_test: $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_test + $(Q) $(LD) $(LDFLAGS) $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_ssl_test: $(H2_SSL_TEST_OBJS:.o=.dep) @@ -12705,14 +12665,14 @@ else -$(BINDIR)/$(CONFIG)/h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl+poll_test + $(Q) $(LD) $(LDFLAGS) $(H2_SSL+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl+poll_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_ssl+poll_test: $(H2_SSL+POLL_TEST_OBJS:.o=.dep) @@ -12737,14 +12697,14 @@ else -$(BINDIR)/$(CONFIG)/h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test + $(Q) $(LD) $(LDFLAGS) $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_ssl_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS:.o=.dep) @@ -12769,14 +12729,14 @@ else -$(BINDIR)/$(CONFIG)/h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uchannel_test + $(Q) $(LD) $(LDFLAGS) $(H2_UCHANNEL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uchannel_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uchannel.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uchannel.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_uchannel_test: $(H2_UCHANNEL_TEST_OBJS:.o=.dep) @@ -12801,14 +12761,14 @@ else -$(BINDIR)/$(CONFIG)/h2_uds_test: $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_uds_test: $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds_test + $(Q) $(LD) $(LDFLAGS) $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_uds_test: $(H2_UDS_TEST_OBJS:.o=.dep) @@ -12833,14 +12793,14 @@ else -$(BINDIR)/$(CONFIG)/h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds+poll_test + $(Q) $(LD) $(LDFLAGS) $(H2_UDS+POLL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds+poll_test endif -$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds+poll.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_h2_uds+poll_test: $(H2_UDS+POLL_TEST_OBJS:.o=.dep) diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 4dfafcea24..549120f2bb 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -150,7 +150,6 @@ def without(l, e): def main(): sec_deps = [ - 'end2end_certs', 'grpc_test_util', 'grpc', 'gpr_test_util', @@ -193,18 +192,6 @@ def main(): 'deps': unsec_deps, 'vs_proj_dir': 'test/end2end/tests', } - ] + [ - { - 'name': 'end2end_certs', - 'build': 'private', - 'language': 'c', - 'src': [ - "test/core/end2end/data/test_root_cert.c", - "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c" - ], - 'vs_proj_dir': 'test/end2end', - } ], 'targets': [ { diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 092ed35ad9..9ffb66af7d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3149,7 +3149,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3167,7 +3166,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3185,7 +3183,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3203,7 +3200,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3221,7 +3217,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3239,7 +3234,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3257,7 +3251,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3275,7 +3268,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3293,7 +3285,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3311,7 +3302,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3329,7 +3319,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3347,7 +3336,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3365,7 +3353,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3383,7 +3370,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3401,7 +3387,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3419,7 +3404,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3437,7 +3421,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -3455,7 +3438,6 @@ }, { "deps": [ - "end2end_certs", "end2end_tests", "gpr", "gpr_test_util", @@ -6299,7 +6281,6 @@ }, { "deps": [ - "end2end_certs", "gpr", "gpr_test_util", "grpc", @@ -6410,18 +6391,5 @@ ], "third_party": false, "type": "lib" - }, - { - "deps": [], - "headers": [], - "language": "c", - "name": "end2end_certs", - "src": [ - "test/core/end2end/data/server1_cert.c", - "test/core/end2end/data/server1_key.c", - "test/core/end2end/data/test_root_cert.c" - ], - "third_party": false, - "type": "lib" } ] diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 413ed3e3f3..2092162f61 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -100,7 +100,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_tests", "vcxproj\te lib = "True" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -118,11 +117,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_nosec_tests", "vcxp {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "end2end_certs", "vcxproj\test/end2end\end2end_certs\end2end_certs.vcxproj", "{80EA2691-C037-6DD3-D3AB-21510BF0E64B}" - ProjectSection(myProperties) = preProject - lib = "True" - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "alarm_test", "vcxproj\test\alarm_test\alarm_test.vcxproj", "{AFD362D7-0E2A-E700-1F27-9D90F76166DF}" ProjectSection(myProperties) = preProject lib = "False" @@ -1100,7 +1094,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_census_test", "vcxproj\t EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1113,7 +1106,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_test", "vcxproj EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1126,7 +1118,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_test", "vcxproj\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1139,7 +1130,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full_test", "vcxproj\tes EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1152,7 +1142,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_test", "vcxproj\t EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1165,7 +1154,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_test", "vcxproj\te EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1178,7 +1166,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_test", "vcxproj EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1191,7 +1178,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair+trace_test", "v EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1204,7 +1190,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_sockpair_1byte_test", "v EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1217,7 +1202,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_test", "vcxproj\test EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1230,7 +1214,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_ssl_proxy_test", "vcxpro EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1243,7 +1226,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_uchannel_test", "vcxproj EndProjectSection ProjectSection(ProjectDependencies) = postProject {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} = {80EA2691-C037-6DD3-D3AB-21510BF0E64B} {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} @@ -1550,22 +1532,6 @@ Global {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|Win32.Build.0 = Release|Win32 {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|x64.ActiveCfg = Release|x64 {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED}.Release-DLL|x64.Build.0 = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|Win32.ActiveCfg = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|x64.ActiveCfg = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|Win32.ActiveCfg = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|x64.ActiveCfg = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|Win32.Build.0 = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug|x64.Build.0 = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|Win32.Build.0 = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release|x64.Build.0 = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Debug-DLL|x64.Build.0 = Debug|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|Win32.Build.0 = Release|Win32 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|x64.ActiveCfg = Release|x64 - {80EA2691-C037-6DD3-D3AB-21510BF0E64B}.Release-DLL|x64.Build.0 = Release|x64 {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|Win32.ActiveCfg = Debug|Win32 {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Debug|x64.ActiveCfg = Debug|x64 {AFD362D7-0E2A-E700-1F27-9D90F76166DF}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj b/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj deleted file mode 100644 index 85502bace4..0000000000 --- a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj +++ /dev/null @@ -1,166 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - end2end_certs - - - end2end_certs - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Windows - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Windows - true - false - true - true - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - diff --git a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters b/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters deleted file mode 100644 index 62b14d1abd..0000000000 --- a/vsprojects/vcxproj/test/end2end/end2end_certs/end2end_certs.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - test\core\end2end\data - - - test\core\end2end\data - - - test\core\end2end\data - - - - - - {c94707fc-9ae9-9cc3-8743-77776eb9d9cc} - - - {f91d3831-d4bb-0981-77a4-16d8c5be07e9} - - - {afbaeee0-7ab8-872c-8c47-3e3e5a8cc5e3} - - - {5e4bc33c-7867-c329-d107-009b198f97dc} - - - - diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj index 612b5df806..2f63ad02a8 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_census_test/h2_census_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj index 4b6fbaa585..c9efe0b671 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_compress_test/h2_compress_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj index 3406fadc1e..d84176e189 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_fakesec_test/h2_fakesec_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj index 96bd4361d0..4ac31f1d34 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_full_test/h2_full_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj index f89d32c192..67cc3c8141 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_oauth2_test/h2_oauth2_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj index 8f56454848..f159dfbd4d 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_proxy_test/h2_proxy_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj index 44427fb134..134913df46 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair+trace_test/h2_sockpair+trace_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj index 5f4e43ff4e..67c548629d 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_1byte_test/h2_sockpair_1byte_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj index 96359174bc..515ea021ea 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_sockpair_test/h2_sockpair_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj index 0693d6573a..c3463b9d61 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_proxy_test/h2_ssl_proxy_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj index 64e0c1be4a..217e4153c9 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_ssl_test/h2_ssl_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj index bcf0f34066..1564608631 100644 --- a/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_uchannel_test/h2_uchannel_test.vcxproj @@ -165,9 +165,6 @@ {1F1F9084-2A93-B80E-364F-5754894AFAB4} - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 9d7bdc574c..f3b311ba70 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -227,9 +227,6 @@ - - {80EA2691-C037-6DD3-D3AB-21510BF0E64B} - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} -- cgit v1.2.3 From 3d2d5b9d279a48d930e34e398081d1ae784e7d42 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 15 Mar 2016 15:54:25 -0700 Subject: Don't hold the GIL when calling anything in core --- .../grpcio/grpc/_cython/_cygrpc/call.pyx.pxi | 41 ++++-- .../grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi | 46 ++++--- .../grpc/_cython/_cygrpc/completion_queue.pyx.pxi | 21 ++- .../grpc/_cython/_cygrpc/credentials.pyx.pxi | 78 ++++++----- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 148 +++++++++++---------- .../grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 94 ++++++++----- .../grpcio/grpc/_cython/_cygrpc/server.pyx.pxi | 51 ++++--- src/python/grpcio/grpc/_cython/cygrpc.pyx | 11 +- 8 files changed, 296 insertions(+), 194 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi index 80f4da51e8..d1b9c98ffc 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,14 +40,17 @@ cdef class Call: def start_batch(self, operations, tag): if not self.is_valid: raise ValueError("invalid call object cannot be used from Python") + cdef grpc_call_error result cdef Operations cy_operations = Operations(operations) cdef OperationTag operation_tag = OperationTag(tag) operation_tag.operation_call = self operation_tag.batch_operations = cy_operations cpython.Py_INCREF(operation_tag) - return grpc_call_start_batch( - self.c_call, cy_operations.c_ops, cy_operations.c_nops, - operation_tag, NULL) + with nogil: + result = grpc_call_start_batch( + self.c_call, cy_operations.c_ops, cy_operations.c_nops, + operation_tag, NULL) + return result def cancel( self, grpc_status_code error_code=GRPC_STATUS__DO_NOT_USE, @@ -57,6 +60,8 @@ cdef class Call: if (details is None) != (error_code == GRPC_STATUS__DO_NOT_USE): raise ValueError("if error_code is specified, so must details " "(and vice-versa)") + cdef grpc_call_error result + cdef char *c_details = NULL if error_code != GRPC_STATUS__DO_NOT_USE: if isinstance(details, bytes): pass @@ -65,25 +70,37 @@ cdef class Call: else: raise TypeError("expected details to be str or bytes") self.references.append(details) - return grpc_call_cancel_with_status( - self.c_call, error_code, details, NULL) + c_details = details + with nogil: + result = grpc_call_cancel_with_status( + self.c_call, error_code, c_details, NULL) + return result else: - return grpc_call_cancel(self.c_call, NULL) + with nogil: + result = grpc_call_cancel(self.c_call, NULL) + return result def set_credentials( self, CallCredentials call_credentials not None): - return grpc_call_set_credentials( - self.c_call, call_credentials.c_credentials) + cdef grpc_call_error result + with nogil: + result = grpc_call_set_credentials( + self.c_call, call_credentials.c_credentials) + return result def peer(self): - cdef char *peer = grpc_call_get_peer(self.c_call) + cdef char *peer = NULL + with nogil: + peer = grpc_call_get_peer(self.c_call) result = peer - gpr_free(peer) + with nogil: + gpr_free(peer) return result def __dealloc__(self): if self.c_call != NULL: - grpc_call_destroy(self.c_call) + with nogil: + grpc_call_destroy(self.c_call) # The object *should* always be valid from Python. Used for debugging. @property diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index bc03c4dcf1..d612c90791 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -35,6 +35,7 @@ cdef class Channel: def __cinit__(self, target, ChannelArgs arguments=None, ChannelCredentials channel_credentials=None): cdef grpc_channel_args *c_arguments = NULL + cdef char *c_target = NULL self.c_channel = NULL self.references = [] if arguments is not None: @@ -45,12 +46,15 @@ cdef class Channel: target = target.encode() else: raise TypeError("expected target to be str or bytes") + c_target = target if channel_credentials is None: - self.c_channel = grpc_insecure_channel_create(target, c_arguments, - NULL) + with nogil: + self.c_channel = grpc_insecure_channel_create(c_target, c_arguments, + NULL) else: - self.c_channel = grpc_secure_channel_create( - channel_credentials.c_credentials, target, c_arguments, NULL) + with nogil: + self.c_channel = grpc_secure_channel_create( + channel_credentials.c_credentials, c_target, c_arguments, NULL) self.references.append(channel_credentials) self.references.append(target) self.references.append(arguments) @@ -66,6 +70,7 @@ cdef class Channel: method = method.encode() else: raise TypeError("expected method to be str or bytes") + cdef char *method_c_string = method cdef char *host_c_string = NULL if host is None: pass @@ -81,31 +86,40 @@ cdef class Channel: cdef grpc_call *parent_call = NULL if parent is not None: parent_call = parent.c_call - operation_call.c_call = grpc_channel_create_call( - self.c_channel, parent_call, flags, - queue.c_completion_queue, method, host_c_string, deadline.c_time, - NULL) + with nogil: + operation_call.c_call = grpc_channel_create_call( + self.c_channel, parent_call, flags, + queue.c_completion_queue, method_c_string, host_c_string, + deadline.c_time, NULL) return operation_call def check_connectivity_state(self, bint try_to_connect): - return grpc_channel_check_connectivity_state(self.c_channel, - try_to_connect) + cdef grpc_connectivity_state result + with nogil: + result = grpc_channel_check_connectivity_state(self.c_channel, + try_to_connect) + return result def watch_connectivity_state( self, grpc_connectivity_state last_observed_state, Timespec deadline not None, CompletionQueue queue not None, tag): cdef OperationTag operation_tag = OperationTag(tag) cpython.Py_INCREF(operation_tag) - grpc_channel_watch_connectivity_state( - self.c_channel, last_observed_state, deadline.c_time, - queue.c_completion_queue, operation_tag) + with nogil: + grpc_channel_watch_connectivity_state( + self.c_channel, last_observed_state, deadline.c_time, + queue.c_completion_queue, operation_tag) def target(self): - cdef char * target = grpc_channel_get_target(self.c_channel) + cdef char *target = NULL + with nogil: + target = grpc_channel_get_target(self.c_channel) result = target - gpr_free(target) + with nogil: + gpr_free(target) return result def __dealloc__(self): if self.c_channel != NULL: - grpc_channel_destroy(self.c_channel) + with nogil: + grpc_channel_destroy(self.c_channel) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi index e11138b1cd..09e47d4222 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi @@ -36,7 +36,8 @@ import time cdef class CompletionQueue: def __cinit__(self): - self.c_completion_queue = grpc_completion_queue_create(NULL) + with nogil: + self.c_completion_queue = grpc_completion_queue_create(NULL) self.is_shutting_down = False self.is_shutdown = False self.pluck_condition = threading.Condition() @@ -82,8 +83,9 @@ cdef class CompletionQueue: def poll(self, Timespec deadline=None): # We name this 'poll' to avoid problems with CPython's expectations for # 'special' methods (like next and __next__). - cdef gpr_timespec c_deadline = gpr_inf_future( - GPR_CLOCK_REALTIME) + cdef gpr_timespec c_deadline + with nogil: + c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) if deadline is not None: c_deadline = deadline.c_time cdef grpc_event event @@ -123,7 +125,8 @@ cdef class CompletionQueue: return self._interpret_event(event) def shutdown(self): - grpc_completion_queue_shutdown(self.c_completion_queue) + with nogil: + grpc_completion_queue_shutdown(self.c_completion_queue) self.is_shutting_down = True def clear(self): @@ -133,15 +136,19 @@ cdef class CompletionQueue: pass def __dealloc__(self): - cdef gpr_timespec c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) + cdef gpr_timespec c_deadline + with nogil: + c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) if self.c_completion_queue != NULL: # Ensure shutdown if not self.is_shutting_down: - grpc_completion_queue_shutdown(self.c_completion_queue) + with nogil: + grpc_completion_queue_shutdown(self.c_completion_queue) # Pump the queue while not self.is_shutdown: with nogil: event = grpc_completion_queue_next( self.c_completion_queue, c_deadline, NULL) self._interpret_event(event) - grpc_completion_queue_destroy(self.c_completion_queue) + with nogil: + grpc_completion_queue_destroy(self.c_completion_queue) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 3f439c8900..1d7adca23e 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -46,7 +46,8 @@ cdef class ChannelCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc_channel_credentials_release(self.c_credentials) + with nogil: + grpc_channel_credentials_release(self.c_credentials) cdef class CallCredentials: @@ -63,7 +64,8 @@ cdef class CallCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc_call_credentials_release(self.c_credentials) + with nogil: + grpc_call_credentials_release(self.c_credentials) cdef class ServerCredentials: @@ -74,7 +76,8 @@ cdef class ServerCredentials: def __dealloc__(self): if self.c_credentials != NULL: - grpc_server_credentials_release(self.c_credentials) + with nogil: + grpc_server_credentials_release(self.c_credentials) cdef class CredentialsMetadataPlugin: @@ -139,7 +142,8 @@ cdef void plugin_destroy_c_plugin_state(void *state): def channel_credentials_google_default(): cdef ChannelCredentials credentials = ChannelCredentials(); - credentials.c_credentials = grpc_google_default_credentials_create() + with nogil: + credentials.c_credentials = grpc_google_default_credentials_create() return credentials def channel_credentials_ssl(pem_root_certificates, @@ -158,12 +162,14 @@ def channel_credentials_ssl(pem_root_certificates, c_pem_root_certificates = pem_root_certificates credentials.references.append(pem_root_certificates) if ssl_pem_key_cert_pair is not None: - credentials.c_credentials = grpc_ssl_credentials_create( - c_pem_root_certificates, &ssl_pem_key_cert_pair.c_pair, NULL) + with nogil: + credentials.c_credentials = grpc_ssl_credentials_create( + c_pem_root_certificates, &ssl_pem_key_cert_pair.c_pair, NULL) credentials.references.append(ssl_pem_key_cert_pair) else: - credentials.c_credentials = grpc_ssl_credentials_create( - c_pem_root_certificates, NULL, NULL) + with nogil: + credentials.c_credentials = grpc_ssl_credentials_create( + c_pem_root_certificates, NULL, NULL) return credentials def channel_credentials_composite( @@ -172,8 +178,9 @@ def channel_credentials_composite( if not credentials_1.is_valid or not credentials_2.is_valid: raise ValueError("passed credentials must both be valid") cdef ChannelCredentials credentials = ChannelCredentials() - credentials.c_credentials = grpc_composite_channel_credentials_create( - credentials_1.c_credentials, credentials_2.c_credentials, NULL) + with nogil: + credentials.c_credentials = grpc_composite_channel_credentials_create( + credentials_1.c_credentials, credentials_2.c_credentials, NULL) credentials.references.append(credentials_1) credentials.references.append(credentials_2) return credentials @@ -184,16 +191,18 @@ def call_credentials_composite( if not credentials_1.is_valid or not credentials_2.is_valid: raise ValueError("passed credentials must both be valid") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc_composite_call_credentials_create( - credentials_1.c_credentials, credentials_2.c_credentials, NULL) + with nogil: + credentials.c_credentials = grpc_composite_call_credentials_create( + credentials_1.c_credentials, credentials_2.c_credentials, NULL) credentials.references.append(credentials_1) credentials.references.append(credentials_2) return credentials def call_credentials_google_compute_engine(): cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = ( - grpc_google_compute_engine_credentials_create(NULL)) + with nogil: + credentials.c_credentials = ( + grpc_google_compute_engine_credentials_create(NULL)) return credentials def call_credentials_service_account_jwt_access( @@ -205,9 +214,11 @@ def call_credentials_service_account_jwt_access( else: raise TypeError("expected json_key to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = ( - grpc_service_account_jwt_access_credentials_create( - json_key, token_lifetime.c_time, NULL)) + cdef char *json_key_c_string = json_key + with nogil: + credentials.c_credentials = ( + grpc_service_account_jwt_access_credentials_create( + json_key_c_string, token_lifetime.c_time, NULL)) credentials.references.append(json_key) return credentials @@ -219,8 +230,10 @@ def call_credentials_google_refresh_token(json_refresh_token): else: raise TypeError("expected json_refresh_token to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc_google_refresh_token_credentials_create( - json_refresh_token, NULL) + cdef char *json_refresh_token_c_string = json_refresh_token + with nogil: + credentials.c_credentials = grpc_google_refresh_token_credentials_create( + json_refresh_token_c_string, NULL) credentials.references.append(json_refresh_token) return credentials @@ -238,17 +251,21 @@ def call_credentials_google_iam(authorization_token, authority_selector): else: raise TypeError("expected authority_selector to be str or bytes") cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = grpc_google_iam_credentials_create( - authorization_token, authority_selector, NULL) + cdef char *authorization_token_c_string = authorization_token + cdef char *authority_selector_c_string = authority_selector + with nogil: + credentials.c_credentials = grpc_google_iam_credentials_create( + authorization_token_c_string, authority_selector_c_string, NULL) credentials.references.append(authorization_token) credentials.references.append(authority_selector) return credentials def call_credentials_metadata_plugin(CredentialsMetadataPlugin plugin): cdef CallCredentials credentials = CallCredentials() - credentials.c_credentials = ( - grpc_metadata_credentials_create_from_plugin(plugin.make_c_plugin(), - NULL)) + cdef grpc_metadata_credentials_plugin c_plugin = plugin.make_c_plugin() + with nogil: + credentials.c_credentials = ( + grpc_metadata_credentials_create_from_plugin(c_plugin, NULL)) # TODO(atash): the following held reference is *probably* never necessary credentials.references.append(plugin) return credentials @@ -274,11 +291,12 @@ def server_credentials_ssl(pem_root_certs, pem_key_cert_pairs, credentials.references.append(pem_key_cert_pairs) credentials.references.append(pem_root_certs) credentials.c_ssl_pem_key_cert_pairs_count = len(pem_key_cert_pairs) - credentials.c_ssl_pem_key_cert_pairs = ( - gpr_malloc( - sizeof(grpc_ssl_pem_key_cert_pair) * - credentials.c_ssl_pem_key_cert_pairs_count - )) + with nogil: + credentials.c_ssl_pem_key_cert_pairs = ( + gpr_malloc( + sizeof(grpc_ssl_pem_key_cert_pair) * + credentials.c_ssl_pem_key_cert_pairs_count + )) for i in range(credentials.c_ssl_pem_key_cert_pairs_count): credentials.c_ssl_pem_key_cert_pairs[i] = ( (pem_key_cert_pairs[i]).c_pair) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index dbf0045710..61165cb021 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -38,27 +38,27 @@ cdef extern from "grpc/_cython/loader.h": int pygrpc_load_core(char*) - void *gpr_malloc(size_t size) - void gpr_free(void *ptr) - void *gpr_realloc(void *p, size_t size) + void *gpr_malloc(size_t size) nogil + void gpr_free(void *ptr) nogil + void *gpr_realloc(void *p, size_t size) nogil ctypedef struct gpr_slice: # don't worry about writing out the members of gpr_slice; we never access # them directly. pass - gpr_slice gpr_slice_ref(gpr_slice s) - void gpr_slice_unref(gpr_slice s) - gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) + gpr_slice gpr_slice_ref(gpr_slice s) nogil + void gpr_slice_unref(gpr_slice s) nogil + gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) nogil gpr_slice gpr_slice_new_with_len( - void *p, size_t len, void (*destroy)(void *, size_t)) - gpr_slice gpr_slice_malloc(size_t length) - gpr_slice gpr_slice_from_copied_string(const char *source) - gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len) + void *p, size_t len, void (*destroy)(void *, size_t)) nogil + gpr_slice gpr_slice_malloc(size_t length) nogil + gpr_slice gpr_slice_from_copied_string(const char *source) nogil + gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len) nogil # Declare functions for function-like macros (because Cython)... - void *gpr_slice_start_ptr "GPR_SLICE_START_PTR" (gpr_slice s) - size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s) + void *gpr_slice_start_ptr "GPR_SLICE_START_PTR" (gpr_slice s) nogil + size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s) nogil ctypedef enum gpr_clock_type: GPR_CLOCK_MONOTONIC @@ -71,14 +71,14 @@ cdef extern from "grpc/_cython/loader.h": int32_t nanoseconds "tv_nsec" gpr_clock_type clock_type - gpr_timespec gpr_time_0(gpr_clock_type type) - gpr_timespec gpr_inf_future(gpr_clock_type type) - gpr_timespec gpr_inf_past(gpr_clock_type type) + gpr_timespec gpr_time_0(gpr_clock_type type) nogil + gpr_timespec gpr_inf_future(gpr_clock_type type) nogil + gpr_timespec gpr_inf_past(gpr_clock_type type) nogil - gpr_timespec gpr_now(gpr_clock_type clock) + gpr_timespec gpr_now(gpr_clock_type clock) nogil gpr_timespec gpr_convert_clock_type(gpr_timespec t, - gpr_clock_type target_clock) + gpr_clock_type target_clock) nogil ctypedef enum grpc_status_code: GRPC_STATUS_OK @@ -114,15 +114,15 @@ cdef extern from "grpc/_cython/loader.h": pass grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, - size_t nslices) - size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) - void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) + size_t nslices) nogil + size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) nogil + void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) nogil void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, - grpc_byte_buffer *buffer) + grpc_byte_buffer *buffer) nogil int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice) - void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) + gpr_slice *slice) nogil + void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) nogil const char *GRPC_ARG_PRIMARY_USER_AGENT_STRING const char *GRPC_ARG_ENABLE_CENSUS @@ -221,8 +221,8 @@ cdef extern from "grpc/_cython/loader.h": size_t capacity grpc_metadata *metadata - void grpc_metadata_array_init(grpc_metadata_array *array) - void grpc_metadata_array_destroy(grpc_metadata_array *array) + void grpc_metadata_array_init(grpc_metadata_array *array) nogil + void grpc_metadata_array_destroy(grpc_metadata_array *array) nogil ctypedef struct grpc_call_details: char *method @@ -231,8 +231,8 @@ cdef extern from "grpc/_cython/loader.h": size_t host_capacity gpr_timespec deadline - void grpc_call_details_init(grpc_call_details *details) - void grpc_call_details_destroy(grpc_call_details *details) + void grpc_call_details_init(grpc_call_details *details) nogil + void grpc_call_details_destroy(grpc_call_details *details) nogil ctypedef enum grpc_op_type: GRPC_OP_SEND_INITIAL_METADATA @@ -277,61 +277,62 @@ cdef extern from "grpc/_cython/loader.h": uint32_t flags grpc_op_data data - void grpc_init() - void grpc_shutdown() + void grpc_init() nogil + void grpc_shutdown() nogil - grpc_completion_queue *grpc_completion_queue_create(void *reserved) + grpc_completion_queue *grpc_completion_queue_create(void *reserved) nogil grpc_event grpc_completion_queue_next(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved) nogil grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved) nogil - void grpc_completion_queue_shutdown(grpc_completion_queue *cq) - void grpc_completion_queue_destroy(grpc_completion_queue *cq) + void grpc_completion_queue_shutdown(grpc_completion_queue *cq) nogil + void grpc_completion_queue_destroy(grpc_completion_queue *cq) nogil - grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, - size_t nops, void *tag, void *reserved) - grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved) + grpc_call_error grpc_call_start_batch( + grpc_call *call, const grpc_op *ops, size_t nops, void *tag, + void *reserved) nogil + grpc_call_error grpc_call_cancel(grpc_call *call, void *reserved) nogil grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description, - void *reserved) - char *grpc_call_get_peer(grpc_call *call) - void grpc_call_destroy(grpc_call *call) + void *reserved) nogil + char *grpc_call_get_peer(grpc_call *call) nogil + void grpc_call_destroy(grpc_call *call) nogil grpc_channel *grpc_insecure_channel_create(const char *target, const grpc_channel_args *args, - void *reserved) - grpc_call *grpc_channel_create_call(grpc_channel *channel, - grpc_call *parent_call, - uint32_t propagation_mask, - grpc_completion_queue *completion_queue, - const char *method, const char *host, - gpr_timespec deadline, void *reserved) + void *reserved) nogil + grpc_call *grpc_channel_create_call( + grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, + grpc_completion_queue *completion_queue, const char *method, + const char *host, gpr_timespec deadline, void *reserved) nogil grpc_connectivity_state grpc_channel_check_connectivity_state( - grpc_channel *channel, int try_to_connect) + grpc_channel *channel, int try_to_connect) nogil void grpc_channel_watch_connectivity_state( grpc_channel *channel, grpc_connectivity_state last_observed_state, - gpr_timespec deadline, grpc_completion_queue *cq, void *tag) - char *grpc_channel_get_target(grpc_channel *channel) - void grpc_channel_destroy(grpc_channel *channel) + gpr_timespec deadline, grpc_completion_queue *cq, void *tag) nogil + char *grpc_channel_get_target(grpc_channel *channel) nogil + void grpc_channel_destroy(grpc_channel *channel) nogil - grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) + grpc_server *grpc_server_create( + const grpc_channel_args *args, void *reserved) nogil grpc_call_error grpc_server_request_call( grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void - *tag_new) + *tag_new) nogil void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, - void *reserved) - int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) - void grpc_server_start(grpc_server *server) + void *reserved) nogil + int grpc_server_add_insecure_http2_port( + grpc_server *server, const char *addr) nogil + void grpc_server_start(grpc_server *server) nogil void grpc_server_shutdown_and_notify( - grpc_server *server, grpc_completion_queue *cq, void *tag) - void grpc_server_cancel_all_calls(grpc_server *server) - void grpc_server_destroy(grpc_server *server) + grpc_server *server, grpc_completion_queue *cq, void *tag) nogil + void grpc_server_cancel_all_calls(grpc_server *server) nogil + void grpc_server_destroy(grpc_server *server) nogil ctypedef struct grpc_ssl_pem_key_cert_pair: const char *private_key @@ -347,35 +348,36 @@ cdef extern from "grpc/_cython/loader.h": ctypedef void (*grpc_ssl_roots_override_callback)(char **pem_root_certs) - void grpc_set_ssl_roots_override_callback(grpc_ssl_roots_override_callback cb) + void grpc_set_ssl_roots_override_callback( + grpc_ssl_roots_override_callback cb) nogil - grpc_channel_credentials *grpc_google_default_credentials_create() + grpc_channel_credentials *grpc_google_default_credentials_create() nogil grpc_channel_credentials *grpc_ssl_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, - void *reserved) + void *reserved) nogil grpc_channel_credentials *grpc_composite_channel_credentials_create( grpc_channel_credentials *creds1, grpc_call_credentials *creds2, - void *reserved) - void grpc_channel_credentials_release(grpc_channel_credentials *creds) + void *reserved) nogil + void grpc_channel_credentials_release(grpc_channel_credentials *creds) nogil grpc_call_credentials *grpc_composite_call_credentials_create( grpc_call_credentials *creds1, grpc_call_credentials *creds2, - void *reserved) + void *reserved) nogil grpc_call_credentials *grpc_google_compute_engine_credentials_create( - void *reserved) + void *reserved) nogil grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( const char *json_key, - gpr_timespec token_lifetime, void *reserved) + gpr_timespec token_lifetime, void *reserved) nogil grpc_call_credentials *grpc_google_refresh_token_credentials_create( - const char *json_refresh_token, void *reserved) + const char *json_refresh_token, void *reserved) nogil grpc_call_credentials *grpc_google_iam_credentials_create( const char *authorization_token, const char *authority_selector, - void *reserved) - void grpc_call_credentials_release(grpc_call_credentials *creds) + void *reserved) nogil + void grpc_call_credentials_release(grpc_call_credentials *creds) nogil grpc_channel *grpc_secure_channel_create( grpc_channel_credentials *creds, const char *target, - const grpc_channel_args *args, void *reserved) + const grpc_channel_args *args, void *reserved) nogil ctypedef struct grpc_server_credentials: # We don't care about the internals (and in fact don't know them) @@ -385,13 +387,13 @@ cdef extern from "grpc/_cython/loader.h": const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved) - void grpc_server_credentials_release(grpc_server_credentials *creds) + void grpc_server_credentials_release(grpc_server_credentials *creds) nogil int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, - grpc_server_credentials *creds) + grpc_server_credentials *creds) nogil grpc_call_error grpc_call_set_credentials(grpc_call *call, - grpc_call_credentials *creds) + grpc_call_credentials *creds) nogil ctypedef struct grpc_auth_context: # We don't care about the internals (and in fact don't know them) @@ -415,4 +417,4 @@ cdef extern from "grpc/_cython/loader.h": const char *type grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( - grpc_metadata_credentials_plugin plugin, void *reserved) + grpc_metadata_credentials_plugin plugin, void *reserved) nogil diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index fa4ea99ea9..851389a261 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -107,15 +107,18 @@ cdef class Timespec: def __cinit__(self, time): if time is None: - self.c_time = gpr_now(GPR_CLOCK_REALTIME) + with nogil: + self.c_time = gpr_now(GPR_CLOCK_REALTIME) return if isinstance(time, int): time = float(time) if isinstance(time, float): if time == float("+inf"): - self.c_time = gpr_inf_future(GPR_CLOCK_REALTIME) + with nogil: + self.c_time = gpr_inf_future(GPR_CLOCK_REALTIME) elif time == float("-inf"): - self.c_time = gpr_inf_past(GPR_CLOCK_REALTIME) + with nogil: + self.c_time = gpr_inf_past(GPR_CLOCK_REALTIME) else: self.c_time.seconds = time self.c_time.nanoseconds = (time - float(self.c_time.seconds)) * 1e9 @@ -131,8 +134,10 @@ cdef class Timespec: # TODO(atash) ensure that everywhere a Timespec is created that it's # converted to GPR_CLOCK_REALTIME then and not every time someone wants to # read values off in Python. - cdef gpr_timespec real_time = ( - gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) + cdef gpr_timespec real_time + with nogil: + real_time = ( + gpr_convert_clock_type(self.c_time, GPR_CLOCK_REALTIME)) return real_time.seconds @property @@ -158,10 +163,12 @@ cdef class Timespec: cdef class CallDetails: def __cinit__(self): - grpc_call_details_init(&self.c_details) + with nogil: + grpc_call_details_init(&self.c_details) def __dealloc__(self): - grpc_call_details_destroy(&self.c_details) + with nogil: + grpc_call_details_destroy(&self.c_details) @property def method(self): @@ -229,10 +236,15 @@ cdef class ByteBuffer: "ByteBuffer, not {}".format(type(data))) cdef char *c_data = data - data_slice = gpr_slice_from_copied_buffer(c_data, len(data)) - self.c_byte_buffer = grpc_raw_byte_buffer_create( - &data_slice, 1) - gpr_slice_unref(data_slice) + cdef gpr_slice data_slice + cdef size_t data_length = len(data) + with nogil: + data_slice = gpr_slice_from_copied_buffer(c_data, data_length) + with nogil: + self.c_byte_buffer = grpc_raw_byte_buffer_create( + &data_slice, 1) + with nogil: + gpr_slice_unref(data_slice) def bytes(self): cdef grpc_byte_buffer_reader reader @@ -240,20 +252,27 @@ cdef class ByteBuffer: cdef size_t data_slice_length cdef void *data_slice_pointer if self.c_byte_buffer != NULL: - grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) + with nogil: + grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) result = b"" - while grpc_byte_buffer_reader_next(&reader, &data_slice): - data_slice_pointer = gpr_slice_start_ptr(data_slice) - data_slice_length = gpr_slice_length(data_slice) - result += (data_slice_pointer)[:data_slice_length] - grpc_byte_buffer_reader_destroy(&reader) + with nogil: + while grpc_byte_buffer_reader_next(&reader, &data_slice): + data_slice_pointer = gpr_slice_start_ptr(data_slice) + data_slice_length = gpr_slice_length(data_slice) + with gil: + result += (data_slice_pointer)[:data_slice_length] + with nogil: + grpc_byte_buffer_reader_destroy(&reader) return result else: return None def __len__(self): + cdef size_t result if self.c_byte_buffer != NULL: - return grpc_byte_buffer_length(self.c_byte_buffer) + with nogil: + result = grpc_byte_buffer_length(self.c_byte_buffer) + return result else: return 0 @@ -262,7 +281,8 @@ cdef class ByteBuffer: def __dealloc__(self): if self.c_byte_buffer != NULL: - grpc_byte_buffer_destroy(self.c_byte_buffer) + with nogil: + grpc_byte_buffer_destroy(self.c_byte_buffer) cdef class SslPemKeyCertPair: @@ -319,14 +339,15 @@ cdef class ChannelArgs: if not isinstance(arg, ChannelArg): raise TypeError("expected list of ChannelArg") self.c_args.arguments_length = len(self.args) - self.c_args.arguments = gpr_malloc( - self.c_args.arguments_length*sizeof(grpc_arg) - ) + with nogil: + self.c_args.arguments = gpr_malloc( + self.c_args.arguments_length*sizeof(grpc_arg)) for i in range(self.c_args.arguments_length): self.c_args.arguments[i] = (self.args[i]).c_arg def __dealloc__(self): - gpr_free(self.c_args.arguments) + with nogil: + gpr_free(self.c_args.arguments) def __len__(self): # self.args is never stale; it's only updated from this file @@ -407,21 +428,24 @@ cdef class Metadata: for metadatum in metadata: if not isinstance(metadatum, Metadatum): raise TypeError("expected list of Metadatum") - grpc_metadata_array_init(&self.c_metadata_array) + with nogil: + grpc_metadata_array_init(&self.c_metadata_array) self.c_metadata_array.count = len(self.metadata) self.c_metadata_array.capacity = len(self.metadata) - self.c_metadata_array.metadata = gpr_malloc( - self.c_metadata_array.count*sizeof(grpc_metadata) - ) + with nogil: + self.c_metadata_array.metadata = gpr_malloc( + self.c_metadata_array.count*sizeof(grpc_metadata) + ) for i in range(self.c_metadata_array.count): self.c_metadata_array.metadata[i] = ( (self.metadata[i]).c_metadata) def __dealloc__(self): # this frees the allocated memory for the grpc_metadata_array (although - # it'd be nice if that were documented somewhere...) TODO(atash): document - # this in the C core - grpc_metadata_array_destroy(&self.c_metadata_array) + # it'd be nice if that were documented somewhere...) + # TODO(atash): document this in the C core + with nogil: + grpc_metadata_array_destroy(&self.c_metadata_array) def __len__(self): return self.c_metadata_array.count @@ -526,7 +550,8 @@ cdef class Operation: # Python. The remaining one(s) are primitive fields filled in by GRPC core. # This means that we need to clean up after receive_status_on_client. if self.c_op.type == GRPC_OP_RECV_STATUS_ON_CLIENT: - gpr_free(self._received_status_details) + with nogil: + gpr_free(self._received_status_details) def operation_send_initial_metadata(Metadata metadata): cdef Operation op = Operation() @@ -648,8 +673,8 @@ cdef class Operations: if not isinstance(operation, Operation): raise TypeError("expected operations to be iterable of Operation") self.c_nops = len(self.operations) - self.c_ops = gpr_malloc( - sizeof(grpc_op)*self.c_nops) + with nogil: + self.c_ops = gpr_malloc(sizeof(grpc_op)*self.c_nops) for i in range(self.c_nops): self.c_ops[i] = ((self.operations[i])).c_op @@ -661,7 +686,8 @@ cdef class Operations: return self.operations[i] def __dealloc__(self): - gpr_free(self.c_ops) + with nogil: + gpr_free(self.c_ops) def __iter__(self): return _OperationsIterator(self) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi index 5f85923524..a098f11da2 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi @@ -41,7 +41,8 @@ cdef class Server: if arguments is not None: c_arguments = &arguments.c_args self.references.append(arguments) - self.c_server = grpc_server_create(c_arguments, NULL) + with nogil: + self.c_server = grpc_server_create(c_arguments, NULL) self.is_started = False self.is_shutting_down = False self.is_shutdown = False @@ -53,6 +54,7 @@ cdef class Server: raise ValueError("server must be started and not shutting down") if server_queue not in self.registered_completion_queues: raise ValueError("server_queue must be a registered completion queue") + cdef grpc_call_error result cdef OperationTag operation_tag = OperationTag(tag) operation_tag.operation_call = Call() operation_tag.request_call_details = CallDetails() @@ -61,19 +63,22 @@ cdef class Server: operation_tag.is_new_request = True operation_tag.batch_operations = Operations([]) cpython.Py_INCREF(operation_tag) - return grpc_server_request_call( - self.c_server, &operation_tag.operation_call.c_call, - &operation_tag.request_call_details.c_details, - &operation_tag.request_metadata.c_metadata_array, - call_queue.c_completion_queue, server_queue.c_completion_queue, - operation_tag) + with nogil: + result = grpc_server_request_call( + self.c_server, &operation_tag.operation_call.c_call, + &operation_tag.request_call_details.c_details, + &operation_tag.request_metadata.c_metadata_array, + call_queue.c_completion_queue, server_queue.c_completion_queue, + operation_tag) + return result def register_completion_queue( self, CompletionQueue queue not None): if self.is_started: raise ValueError("cannot register completion queues after start") - grpc_server_register_completion_queue( - self.c_server, queue.c_completion_queue, NULL) + with nogil: + grpc_server_register_completion_queue( + self.c_server, queue.c_completion_queue, NULL) self.registered_completion_queues.append(queue) def start(self): @@ -82,7 +87,8 @@ cdef class Server: self.backup_shutdown_queue = CompletionQueue() self.register_completion_queue(self.backup_shutdown_queue) self.is_started = True - grpc_server_start(self.c_server) + with nogil: + grpc_server_start(self.c_server) # Ensure the core has gotten a chance to do the start-up work self.backup_shutdown_queue.pluck(None, Timespec(None)) @@ -95,21 +101,28 @@ cdef class Server: else: raise TypeError("expected address to be a str or bytes") self.references.append(address) + cdef int result + cdef char *address_c_string = address if server_credentials is not None: self.references.append(server_credentials) - return grpc_server_add_secure_http2_port( - self.c_server, address, server_credentials.c_credentials) + with nogil: + result = grpc_server_add_secure_http2_port( + self.c_server, address_c_string, server_credentials.c_credentials) else: - return grpc_server_add_insecure_http2_port(self.c_server, address) + with nogil: + result = grpc_server_add_insecure_http2_port(self.c_server, + address_c_string) + return result cdef _c_shutdown(self, CompletionQueue queue, tag): self.is_shutting_down = True operation_tag = OperationTag(tag) operation_tag.shutting_down_server = self cpython.Py_INCREF(operation_tag) - grpc_server_shutdown_and_notify( - self.c_server, queue.c_completion_queue, - operation_tag) + with nogil: + grpc_server_shutdown_and_notify( + self.c_server, queue.c_completion_queue, + operation_tag) def shutdown(self, CompletionQueue queue not None, tag): cdef OperationTag operation_tag @@ -134,7 +147,8 @@ cdef class Server: elif self.is_shutdown: return else: - grpc_server_cancel_all_calls(self.c_server) + with nogil: + grpc_server_cancel_all_calls(self.c_server) def __dealloc__(self): if self.c_server != NULL: @@ -153,5 +167,6 @@ cdef class Server: # much but repeatedly release the GIL and wait while not self.is_shutdown: time.sleep(0) - grpc_server_destroy(self.c_server) + with nogil: + grpc_server_destroy(self.c_server) diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index 30cc7a132b..8a0f171ee7 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -57,14 +57,17 @@ cdef class _ModuleState: 'grpc._cython', '_windows/grpc_c.64.python') if not pygrpc_load_core(filename): raise ImportError('failed to load core gRPC library') - grpc_init() + with nogil: + grpc_init() self.is_loaded = True - grpc_set_ssl_roots_override_callback( - ssl_roots_override_callback) + with nogil: + grpc_set_ssl_roots_override_callback( + ssl_roots_override_callback) def __dealloc__(self): if self.is_loaded: - grpc_shutdown() + with nogil: + grpc_shutdown() _module_state = _ModuleState() -- cgit v1.2.3 From a35c7d47af3329423000cbe61fc282dcb9510246 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 16 Mar 2016 10:08:49 -0700 Subject: Address review comments --- tools/run_tests/stress_test/README.md | 47 ++++++++++------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md index 397e241cf7..c4ca28bea2 100644 --- a/tools/run_tests/stress_test/README.md +++ b/tools/run_tests/stress_test/README.md @@ -9,15 +9,18 @@ ### **Setup Instructions** #### *On GCP:* -1. Create a GCP account (if you haven’t already) at https://cloud.google.com +1. Login to GCP with your Google account (for example, your @gmail account) at https://cloud.google.com. If do not have a Google account, you will have to create an account first. 2. Enable billing on Google cloud platform. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (see the '*Enable billing*' section). -3. Create a Project from the [GCP console](https://console.cloud.google.com) -4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). +3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right if the search box) and click `Create a project` option. +4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). Alternatively, you can do the following: + - 4.1 Click on the `Products & Services` icon on the top left (i.e the icon with three horizontal bars) and select `API Manager` + - 4.2 Select the `Container Engine API` under `Google Cloud APIs` on the main page. Note that you might have to click on `More` under `Google Cloud APIs` to see the `Container Engine API` link + - 4.3 Click on the `Enable` button. If the API is already enabled, the button's label would be `Disable` instead (do not click the button if its label is `Disable`) 5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click ‘Create Container Cluster’ and follow the instructions. - 5.1. The instructions for Name/Zone/MachineType etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) - 5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. - 5.3. **IMPORTANT**: Before hitting the "Create" button, click on “More” link just above the "Create" button and Select "Enabled" for BigQuery , "Enabled" for Cloud Platform and "Read/Write" for Cloud User Accounts. - 5.4. Create the cluster by clicking "Create" button. + - 5.1. The instructions for Name/Zone/MachineType etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) + - 5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. For the machine type, something like '2 vCPUs 7.5 GB' (available in the drop down box) should be good enough. + - 5.3. **IMPORTANT**: Before hitting the "Create" button, click on “More” link just above the "Create" button and Select "Enabled" for BigQuery , "Enabled" for Cloud Platform and "Read/Write" for Cloud User Accounts. + - 5.4. Create the cluster by clicking "Create" button. #### *On your machine* (or the machine from which stress tests on GKE are launched): 1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions at https://github.com/grpc/grpc/blob/master/INSTALL.md @@ -27,34 +30,10 @@ `$ gcloud components update kubectl` 5. Install Google python client apis: `‘$ sudo pip install --upgrade google-api-python-client’` - **Note**: Do `$ easy_install -U pip` if you do not have pip -6. Install the `requests` Python package if you don’t have it already. Instructions are [here](http://docs.python-requests.org/en/master/user/install/) + **Note**: Do `$ sudo apt-get install python-pip` or `$ easy_install -U pip` if you do not have pip +6. Install the `requests` Python package if you don’t have it already by doing `sudo pip install requests`. More details regarding `requests` package are [here](http://docs.python-requests.org/en/master/user/install/) 7. Set the `gcloud` defaults: See the instructions at https://cloud.google.com/container-engine/docs/before-you-begin under "*Set gcloud defaults*" section) -7.1. Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` - -### **Launching Stress tests** - -The stress tests are launched by the following script (path is relative to GRPC root directory) : -`tools/run_tests/stress_test/run_stress_tests_on_gke.py` - -The script has several parameters and you can find out more details by using the `--help` flag. -`$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` - -> **Example** -> `$ tools/run_tests/Stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` - ->Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. - -> Note: we currently do not have the ability to launch multiple instances of the server. This can be added very easily in future - -all `kubectl`, Kubernetes command line tool using `gcloud` - `$ gcloud components update kubectl` -5. Install Google python client apis: - `‘$ sudo pip install --upgrade google-api-python-client’` - **Note**: Do `$ easy_install -U pip` if you do not have pip -6. Install the `requests` Python package if you don’t have it already. Instructions are [here](http://docs.python-requests.org/en/master/user/install/) -7. Set the `gcloud` defaults: See the instructions at https://cloud.google.com/container-engine/docs/before-you-begin under "*Set gcloud defaults*" section) -7.1. Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` + - 7.1. Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` ### **Launching Stress tests** -- cgit v1.2.3 From f317fb4880d19b87f39885d1b6998c32c1af1d83 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 16 Mar 2016 10:21:20 -0700 Subject: Minor formatting tweaks --- tools/run_tests/stress_test/README.md | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md index c4ca28bea2..45429750b7 100644 --- a/tools/run_tests/stress_test/README.md +++ b/tools/run_tests/stress_test/README.md @@ -11,41 +11,41 @@ #### *On GCP:* 1. Login to GCP with your Google account (for example, your @gmail account) at https://cloud.google.com. If do not have a Google account, you will have to create an account first. 2. Enable billing on Google cloud platform. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (see the '*Enable billing*' section). -3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right if the search box) and click `Create a project` option. +3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right if the search box) and click '*Create a project*' option. 4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). Alternatively, you can do the following: - - 4.1 Click on the `Products & Services` icon on the top left (i.e the icon with three horizontal bars) and select `API Manager` - - 4.2 Select the `Container Engine API` under `Google Cloud APIs` on the main page. Note that you might have to click on `More` under `Google Cloud APIs` to see the `Container Engine API` link - - 4.3 Click on the `Enable` button. If the API is already enabled, the button's label would be `Disable` instead (do not click the button if its label is `Disable`) -5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click ‘Create Container Cluster’ and follow the instructions. - - 5.1. The instructions for Name/Zone/MachineType etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) + - 4.1 Click on the '*Products & Services*' icon on the top left (i.e the icon with three horizontal bars) and select '*API Manager*' + - 4.2 Select the '*Container Engine API*' under '*Google Cloud APIs*' on the main page. Note that you might have to click on '*More*' under '*Google Cloud APIs*' to see the '*Container Engine API*' link + - 4.3 Click on the '*Enable*' button. If the API is already enabled, the button's label would be '*Disable*' instead (do NOT click the button if its label is '*Disable*') +5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click '*Create Container Cluster*' and follow the instructions. + - 5.1. The instructions for 'Name/Zone/MachineType' etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) - 5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. For the machine type, something like '2 vCPUs 7.5 GB' (available in the drop down box) should be good enough. - - 5.3. **IMPORTANT**: Before hitting the "Create" button, click on “More” link just above the "Create" button and Select "Enabled" for BigQuery , "Enabled" for Cloud Platform and "Read/Write" for Cloud User Accounts. - - 5.4. Create the cluster by clicking "Create" button. + - 5.3. **IMPORTANT**: Before hitting the '*Create*' button, click on '*More*' link just above the '*Create*' button and Select '*Enabled*' for BigQuery , '*Enabled*' for Cloud Platform and '*Read/Write*' for Cloud User Accounts. + - 5.4. Create the cluster by clicking '*Create*' button. -#### *On your machine* (or the machine from which stress tests on GKE are launched): -1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions at https://github.com/grpc/grpc/blob/master/INSTALL.md -2. Install Docker (https://docs.docker.com/engine/installation/) +#### *On your machine* (or the machine from which stress tests on GKE are launched): +1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions [here](https://github.com/grpc/grpc/blob/master/INSTALL.md) +2. Install Docker. Instructions [here](https://docs.docker.com/engine/installation/) 3. Install Google Cloud SDK. Instructions [here](https://cloud.google.com/sdk/). This installs the `gcloud` tool -4. Install `kubectl`, Kubernetes command line tool using `gcloud` - `$ gcloud components update kubectl` -5. Install Google python client apis: - `‘$ sudo pip install --upgrade google-api-python-client’` - **Note**: Do `$ sudo apt-get install python-pip` or `$ easy_install -U pip` if you do not have pip +4. Install `kubectl`, Kubernetes command line tool using `gcloud`. i.e + - `$ gcloud components update kubectl` +5. Install Google python client apis: + - `‘$ sudo pip install --upgrade google-api-python-client’` + - **Note**: Do `$ sudo apt-get install python-pip` (or `$ easy_install -U pip`) if you do not have pip 6. Install the `requests` Python package if you don’t have it already by doing `sudo pip install requests`. More details regarding `requests` package are [here](http://docs.python-requests.org/en/master/user/install/) -7. Set the `gcloud` defaults: See the instructions at https://cloud.google.com/container-engine/docs/before-you-begin under "*Set gcloud defaults*" section) - - 7.1. Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` +7. Set the `gcloud` defaults: See the instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) under "*Set gcloud defaults*" section) + - Make sure you also fetch the cluster credentials for `kubectl` command to use. I.e `$ gcloud container clusters get-credentials CLUSTER_NAME` ### **Launching Stress tests** The stress tests are launched by the following script (path is relative to GRPC root directory) : `tools/run_tests/stress_test/run_stress_tests_on_gke.py` -The script has several parameters and you can find out more details by using the `--help` flag. -`$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` +The script has several parameters and you can find out more details by using the `--help` flag. + - `$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` > **Example** > `$ tools/run_tests/Stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` ->Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. +> Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. > Note: we currently do not have the ability to launch multiple instances of the server. This can be added very easily in future -- cgit v1.2.3 From f90d765f692ae461587dbe4f12dedde4c4b66908 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 16 Mar 2016 10:28:05 -0700 Subject: More formatting changes --- tools/run_tests/stress_test/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md index 45429750b7..e892ccd72f 100644 --- a/tools/run_tests/stress_test/README.md +++ b/tools/run_tests/stress_test/README.md @@ -13,14 +13,14 @@ 2. Enable billing on Google cloud platform. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (see the '*Enable billing*' section). 3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right if the search box) and click '*Create a project*' option. 4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). Alternatively, you can do the following: - - 4.1 Click on the '*Products & Services*' icon on the top left (i.e the icon with three horizontal bars) and select '*API Manager*' - - 4.2 Select the '*Container Engine API*' under '*Google Cloud APIs*' on the main page. Note that you might have to click on '*More*' under '*Google Cloud APIs*' to see the '*Container Engine API*' link - - 4.3 Click on the '*Enable*' button. If the API is already enabled, the button's label would be '*Disable*' instead (do NOT click the button if its label is '*Disable*') + - Click on the '*Products & Services*' icon on the top left (i.e the icon with three horizontal bars) and select '*API Manager*' + - Select the '*Container Engine API*' under '*Google Cloud APIs*' on the main page. Note that you might have to click on '*More*' under '*Google Cloud APIs*' to see the '*Container Engine API*' link + - Click on the '*Enable*' button. If the API is already enabled, the button's label would be '*Disable*' instead (do NOT click the button if its label is '*Disable*') 5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click '*Create Container Cluster*' and follow the instructions. - - 5.1. The instructions for 'Name/Zone/MachineType' etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) - - 5.2. For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. For the machine type, something like '2 vCPUs 7.5 GB' (available in the drop down box) should be good enough. - - 5.3. **IMPORTANT**: Before hitting the '*Create*' button, click on '*More*' link just above the '*Create*' button and Select '*Enabled*' for BigQuery , '*Enabled*' for Cloud Platform and '*Read/Write*' for Cloud User Accounts. - - 5.4. Create the cluster by clicking '*Create*' button. + - The instructions for 'Name/Zone/MachineType' etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) + - For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. For the machine type, something like '2 vCPUs 7.5 GB' (available in the drop down box) should be good enough. + - **IMPORTANT**: Before hitting the '*Create*' button, click on '*More*' link just above the '*Create*' button and Select '*Enabled*' for BigQuery , '*Enabled*' for Cloud Platform and '*Read/Write*' for Cloud User Accounts. + - Create the cluster by clicking '*Create*' button. #### *On your machine* (or the machine from which stress tests on GKE are launched): 1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions [here](https://github.com/grpc/grpc/blob/master/INSTALL.md) -- cgit v1.2.3 From ce2b3084e77d36a54b4e57c1a97f68d90846ae7e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 10:43:49 -0700 Subject: Get stack traces in crash dumps working for Windows --- test/core/util/test_config.c | 127 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 117 insertions(+), 10 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 14bfc957cb..83bbc0f4c4 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -38,6 +38,8 @@ #include "src/core/support/string.h" #include #include +#include +#include double g_fixture_slowdown_factor = 1.0; @@ -52,14 +54,115 @@ static unsigned seed(void) { return _getpid(); } #endif #if GPR_WINDOWS_CRASH_HANDLER -LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { - gpr_log(GPR_DEBUG, "Exception handler called, dumping information"); - while (ex_info->ExceptionRecord) { - DWORD code = ex_info->ExceptionRecord->ExceptionCode; - DWORD flgs = ex_info->ExceptionRecord->ExceptionFlags; - PVOID addr = ex_info->ExceptionRecord->ExceptionAddress; - gpr_log("code: %x - flags: %d - address: %p", code, flgs, addr); - ex_info->ExceptionRecord = ex_info->ExceptionRecord->ExceptionRecord; +#include "DbgHelp.h" + +#pragma comment(lib, "dbghelp.lib") + +static void print_current_stack() { + typedef USHORT(WINAPI *CaptureStackBackTraceType)(__in ULONG, __in ULONG, __out PVOID*, __out_opt PULONG); + CaptureStackBackTraceType func = (CaptureStackBackTraceType)(GetProcAddress(LoadLibrary(L"kernel32.dll"), "RtlCaptureStackBackTrace")); + + if (func == NULL) + return; // WOE 29.SEP.2010 + + // Quote from Microsoft Documentation: + // ## Windows Server 2003 and Windows XP: + // ## The sum of the FramesToSkip and FramesToCapture parameters must be less than 63. +#define MAX_CALLERS 62 + + void * callers_stack[MAX_CALLERS]; + unsigned short frames; + SYMBOL_INFOW * symbol; + HANDLE process; + process = GetCurrentProcess(); + SymInitialize(process, NULL, TRUE); + frames = (func)(0, MAX_CALLERS, callers_stack, NULL); + symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(char), 1); + symbol->MaxNameLen = 255; + symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); + + const unsigned short MAX_CALLERS_SHOWN = 32; + frames = frames < MAX_CALLERS_SHOWN ? frames : MAX_CALLERS_SHOWN; + for (unsigned int i = 0; i < frames; i++) { + SymFromAddrW(process, (DWORD64)(callers_stack[i]), 0, symbol); + fwprintf(stderr, L"*** %d: %016I64LX %ls - 0x%0X\n", i, (DWORD64)callers_stack[i], symbol->Name, symbol->Address); + } + + free(symbol); +} + +static void print_stack_from_context(CONTEXT c) { + STACKFRAME s; // in/out stackframe + memset(&s, 0, sizeof(s)); + DWORD imageType; +#ifdef _M_IX86 + // normally, call ImageNtHeader() and use machine info from PE header + imageType = IMAGE_FILE_MACHINE_I386; + s.AddrPC.Offset = c.Eip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Ebp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Esp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_X64 + imageType = IMAGE_FILE_MACHINE_AMD64; + s.AddrPC.Offset = c.Rip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Rsp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Rsp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_IA64 + imageType = IMAGE_FILE_MACHINE_IA64; + s.AddrPC.Offset = c.StIIP; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.IntSp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrBStore.Offset = c.RsBSP; + s.AddrBStore.Mode = AddrModeFlat; + s.AddrStack.Offset = c.IntSp; + s.AddrStack.Mode = AddrModeFlat; +#else +#error "Platform not supported!" +#endif + + HANDLE process = GetCurrentProcess(); + HANDLE thread = GetCurrentThread(); + + SYMBOL_INFOW *symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(char), 1); + symbol->MaxNameLen = 255; + symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); + + while (StackWalk(imageType, + process, + thread, + &s, + &c, + 0, + SymFunctionTableAccess, + SymGetModuleBase, + 0)) { + BOOL has_symbol = SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol); + fwprintf(stderr, L"*** %016I64LX %ls - 0x%0X\n", (DWORD64)(s.AddrPC.Offset), has_symbol ? symbol->Name : L"<>", symbol->Address); + } + + free(symbol); +} + +static LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { + fprintf(stderr, "Exception handler called, dumping information\n"); + bool try_to_print_stack = true; + PEXCEPTION_RECORD exrec = ex_info->ExceptionRecord; + while (exrec) { + DWORD code = exrec->ExceptionCode; + DWORD flgs = exrec->ExceptionFlags; + PVOID addr = exrec->ExceptionAddress; + if (code == EXCEPTION_STACK_OVERFLOW) try_to_print_stack = false; + fprintf(stderr, "code: %x - flags: %d - address: %p\n", code, flgs, addr); + exrec = exrec->ExceptionRecord; + } + if (try_to_print_stack) { + print_stack_from_context(*ex_info->ContextRecord); } if (IsDebuggerPresent()) { __debugbreak(); @@ -69,8 +172,9 @@ LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { return EXCEPTION_EXECUTE_HANDLER; } -void abort_handler(int sig) { - gpr_log(GPR_DEBUG, "Abort handler called."); +static void abort_handler(int sig) { + fprintf(stderr, "Abort handler called."); + print_current_stack(NULL); if (IsDebuggerPresent()) { __debugbreak(); } else { @@ -79,6 +183,9 @@ void abort_handler(int sig) { } static void install_crash_handler() { + if (!SymInitialize(GetCurrentProcess(), NULL, TRUE)) { + fprintf(stderr, "SymInitialize failed: %d", GetLastError()); + } SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)crash_handler); _set_abort_behavior(0, _WRITE_ABORT_MSG); _set_abort_behavior(0, _CALL_REPORTFAULT); -- cgit v1.2.3 From 2b45cb827f0a65a84c5577a11f7d9572446124d8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 10:44:57 -0700 Subject: clang-format code --- test/core/util/test_config.c | 49 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 83bbc0f4c4..554c653072 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -59,21 +59,23 @@ static unsigned seed(void) { return _getpid(); } #pragma comment(lib, "dbghelp.lib") static void print_current_stack() { - typedef USHORT(WINAPI *CaptureStackBackTraceType)(__in ULONG, __in ULONG, __out PVOID*, __out_opt PULONG); - CaptureStackBackTraceType func = (CaptureStackBackTraceType)(GetProcAddress(LoadLibrary(L"kernel32.dll"), "RtlCaptureStackBackTrace")); + typedef USHORT(WINAPI * CaptureStackBackTraceType)( + __in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG); + CaptureStackBackTraceType func = (CaptureStackBackTraceType)( + GetProcAddress(LoadLibrary(L"kernel32.dll"), "RtlCaptureStackBackTrace")); - if (func == NULL) - return; // WOE 29.SEP.2010 + if (func == NULL) return; // WOE 29.SEP.2010 - // Quote from Microsoft Documentation: - // ## Windows Server 2003 and Windows XP: - // ## The sum of the FramesToSkip and FramesToCapture parameters must be less than 63. +// Quote from Microsoft Documentation: +// ## Windows Server 2003 and Windows XP: +// ## The sum of the FramesToSkip and FramesToCapture parameters must be less +// than 63. #define MAX_CALLERS 62 - void * callers_stack[MAX_CALLERS]; + void *callers_stack[MAX_CALLERS]; unsigned short frames; - SYMBOL_INFOW * symbol; - HANDLE process; + SYMBOL_INFOW *symbol; + HANDLE process; process = GetCurrentProcess(); SymInitialize(process, NULL, TRUE); frames = (func)(0, MAX_CALLERS, callers_stack, NULL); @@ -81,18 +83,19 @@ static void print_current_stack() { symbol->MaxNameLen = 255; symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); - const unsigned short MAX_CALLERS_SHOWN = 32; + const unsigned short MAX_CALLERS_SHOWN = 32; frames = frames < MAX_CALLERS_SHOWN ? frames : MAX_CALLERS_SHOWN; for (unsigned int i = 0; i < frames; i++) { SymFromAddrW(process, (DWORD64)(callers_stack[i]), 0, symbol); - fwprintf(stderr, L"*** %d: %016I64LX %ls - 0x%0X\n", i, (DWORD64)callers_stack[i], symbol->Name, symbol->Address); + fwprintf(stderr, L"*** %d: %016I64LX %ls - 0x%0X\n", i, + (DWORD64)callers_stack[i], symbol->Name, symbol->Address); } free(symbol); } static void print_stack_from_context(CONTEXT c) { - STACKFRAME s; // in/out stackframe + STACKFRAME s; // in/out stackframe memset(&s, 0, sizeof(s)); DWORD imageType; #ifdef _M_IX86 @@ -129,21 +132,17 @@ static void print_stack_from_context(CONTEXT c) { HANDLE process = GetCurrentProcess(); HANDLE thread = GetCurrentThread(); - SYMBOL_INFOW *symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(char), 1); + SYMBOL_INFOW *symbol = + (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(char), 1); symbol->MaxNameLen = 255; symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); - while (StackWalk(imageType, - process, - thread, - &s, - &c, - 0, - SymFunctionTableAccess, - SymGetModuleBase, - 0)) { - BOOL has_symbol = SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol); - fwprintf(stderr, L"*** %016I64LX %ls - 0x%0X\n", (DWORD64)(s.AddrPC.Offset), has_symbol ? symbol->Name : L"<>", symbol->Address); + while (StackWalk(imageType, process, thread, &s, &c, 0, + SymFunctionTableAccess, SymGetModuleBase, 0)) { + BOOL has_symbol = + SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol); + fwprintf(stderr, L"*** %016I64LX %ls - 0x%0X\n", (DWORD64)(s.AddrPC.Offset), + has_symbol ? symbol->Name : L"<>", symbol->Address); } free(symbol); -- cgit v1.2.3 From 3c788053bc86020a59eae45f538551f325422494 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 10:45:32 -0700 Subject: Fix copyright --- test/core/util/test_config.c | 2 +- third_party/boringssl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 554c653072..94ef1be6ce 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -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 diff --git a/third_party/boringssl b/third_party/boringssl index 9f897b2580..907ae62b9d 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 9f897b25800d2f54f5c442ef01a60721aeca6d87 +Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 -- cgit v1.2.3 From ae2283d3dd504d796b8f846da077dc22b097ef4e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 10:53:58 -0700 Subject: Bleh --- third_party/boringssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/boringssl b/third_party/boringssl index 907ae62b9d..9f897b2580 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 +Subproject commit 9f897b25800d2f54f5c442ef01a60721aeca6d87 -- cgit v1.2.3 From f6c7a9823eec85be718a30960c9aa073d0192580 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 16 Mar 2016 11:07:18 -0700 Subject: More additions / Typos --- tools/run_tests/stress_test/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/run_tests/stress_test/README.md b/tools/run_tests/stress_test/README.md index e892ccd72f..80e4cd58f0 100644 --- a/tools/run_tests/stress_test/README.md +++ b/tools/run_tests/stress_test/README.md @@ -11,12 +11,14 @@ #### *On GCP:* 1. Login to GCP with your Google account (for example, your @gmail account) at https://cloud.google.com. If do not have a Google account, you will have to create an account first. 2. Enable billing on Google cloud platform. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (see the '*Enable billing*' section). -3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right if the search box) and click '*Create a project*' option. +3. Create a Project from the [GCP console](https://console.cloud.google.com).i.e Click on the project dropdown box on the top right (to the right of the search box) and click '*Create a project*' option. 4. Enable the Container Engine API. Instructions [here](https://cloud.google.com/container-engine/docs/before-you-begin) (See the '*Enable the Container Engine API*’ section). Alternatively, you can do the following: - - Click on the '*Products & Services*' icon on the top left (i.e the icon with three horizontal bars) and select '*API Manager*' + - Click on the '*Products & Services*' icon on the top left (i.e the icon with three small horizontal bars) and select '*API Manager*' - Select the '*Container Engine API*' under '*Google Cloud APIs*' on the main page. Note that you might have to click on '*More*' under '*Google Cloud APIs*' to see the '*Container Engine API*' link - Click on the '*Enable*' button. If the API is already enabled, the button's label would be '*Disable*' instead (do NOT click the button if its label is '*Disable*') -5. Create a Cluster from the GCP console. i.e Go to the Container Engine section from GCP console and click '*Create Container Cluster*' and follow the instructions. +5. Create a Cluster from the GCP console. + - Go to the Container Engine section from GCP console i.e: Click on the '*Products & Services*' icon on the top left (i.e the icon with three small horizontal bars) and click on '*Container Engine*' + - Click '*Create Container Cluster*' and follow the instructions. - The instructions for 'Name/Zone/MachineType' etc are [here](https://cloud.google.com/container-engine/docs/clusters/operations) (**NOTE**: The page also has instructions to setting up default clusters and configuring `kubectl`. We will be doing that later) - For the cluster size, a smaller size of < 10 GCE instances is good enough for our use cases - assuming that we are planning to run a reasonably small number of stress client instances. For the machine type, something like '2 vCPUs 7.5 GB' (available in the drop down box) should be good enough. - **IMPORTANT**: Before hitting the '*Create*' button, click on '*More*' link just above the '*Create*' button and Select '*Enabled*' for BigQuery , '*Enabled*' for Cloud Platform and '*Read/Write*' for Cloud User Accounts. @@ -26,7 +28,7 @@ 1. You need a working gRPC repository on your machine. If you do not have it, clone the grpc repository from github (https://github.com/grpc/grpc) and follow the instructions [here](https://github.com/grpc/grpc/blob/master/INSTALL.md) 2. Install Docker. Instructions [here](https://docs.docker.com/engine/installation/) 3. Install Google Cloud SDK. Instructions [here](https://cloud.google.com/sdk/). This installs the `gcloud` tool -4. Install `kubectl`, Kubernetes command line tool using `gcloud`. i.e +4. Install `kubectl`, Kubernetes command line tool using `gcloud`. i.e - `$ gcloud components update kubectl` 5. Install Google python client apis: - `‘$ sudo pip install --upgrade google-api-python-client’` @@ -44,8 +46,8 @@ The script has several parameters and you can find out more details by using the - `$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --help` > **Example** -> `$ tools/run_tests/Stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` +> `$ tools/run_tests/stress_test/run_stress_tests_on_gke.py --project_id=sree-gce --test_duration_secs=180 --num_clients=5` -> Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. +> Launches the 5 instances of stress test clients, 1 instance of stress test server and runs the test for 180 seconds. The test would be run on the default container cluster (that you have set in `gcloud`) in the project `sree-gce`. > Note: we currently do not have the ability to launch multiple instances of the server. This can be added very easily in future -- cgit v1.2.3 From c9c0b8bf42e2fe41ff55318eb45d2716bcf0fc68 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 14:57:29 -0700 Subject: Review feedback --- test/core/util/test_config.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 94ef1be6ce..ede9118ac5 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -54,15 +54,20 @@ static unsigned seed(void) { return _getpid(); } #endif #if GPR_WINDOWS_CRASH_HANDLER -#include "DbgHelp.h" +#include +#include +#define DBGHELP_TRANSLATE_TCHAR +#include +#ifdef _MSC_VER #pragma comment(lib, "dbghelp.lib") +#endif static void print_current_stack() { typedef USHORT(WINAPI * CaptureStackBackTraceType)( __in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG); CaptureStackBackTraceType func = (CaptureStackBackTraceType)( - GetProcAddress(LoadLibrary(L"kernel32.dll"), "RtlCaptureStackBackTrace")); + GetProcAddress(LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace")); if (func == NULL) return; // WOE 29.SEP.2010 @@ -79,7 +84,7 @@ static void print_current_stack() { process = GetCurrentProcess(); SymInitialize(process, NULL, TRUE); frames = (func)(0, MAX_CALLERS, callers_stack, NULL); - symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(char), 1); + symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); symbol->MaxNameLen = 255; symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); @@ -133,7 +138,7 @@ static void print_stack_from_context(CONTEXT c) { HANDLE thread = GetCurrentThread(); SYMBOL_INFOW *symbol = - (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(char), 1); + (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); symbol->MaxNameLen = 255; symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); -- cgit v1.2.3 From adf3a9d0b06359f07a22a5b2d37638c7f9a4ad02 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 14:59:36 -0700 Subject: clang-fmt --- test/core/util/test_config.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index ede9118ac5..15ba78413c 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -66,8 +66,8 @@ static unsigned seed(void) { return _getpid(); } static void print_current_stack() { typedef USHORT(WINAPI * CaptureStackBackTraceType)( __in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG); - CaptureStackBackTraceType func = (CaptureStackBackTraceType)( - GetProcAddress(LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace")); + CaptureStackBackTraceType func = (CaptureStackBackTraceType)(GetProcAddress( + LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace")); if (func == NULL) return; // WOE 29.SEP.2010 @@ -84,7 +84,8 @@ static void print_current_stack() { process = GetCurrentProcess(); SymInitialize(process, NULL, TRUE); frames = (func)(0, MAX_CALLERS, callers_stack, NULL); - symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); + symbol = + (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); symbol->MaxNameLen = 255; symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); -- cgit v1.2.3 From 028bd45950818d0d4a59c6a17331c1a2b08915d6 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 16 Mar 2016 16:25:42 -0700 Subject: Update check copyright script precommit hook --- tools/distrib/check_copyright.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index 99771f9632..5badbf484b 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -105,7 +105,7 @@ RE_LICENSE = dict( for k, v in LICENSE_PREFIX.iteritems()) if args.precommit: - FILE_LIST_COMMAND = 'git diff --name-only HEAD | grep -v ^third_party/' + FILE_LIST_COMMAND = 'git status -z | grep -Poz \'(?<=^[MARC][MARCD ] )[^\s]+\'' else: FILE_LIST_COMMAND = 'git ls-tree -r --name-only -r HEAD | grep -v ^third_party/' -- cgit v1.2.3 From e8fb852a733282966e23d6d7255b4a2f6f1eaee2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 14 Mar 2016 19:46:57 +0100 Subject: Massaging that pull request. --- BUILD | 192 +++++++++++++++++- Makefile | 166 ++++++++++++---- binding.gyp | 22 --- build.yaml | 103 +++++----- gRPC.podspec | 6 + grpc.gemspec | 6 + package.json | 218 ++++++++++----------- package.xml | 6 + tools/doxygen/Doxyfile.c++ | 33 +++- tools/doxygen/Doxyfile.c++.internal | 34 +++- tools/doxygen/Doxyfile.core | 6 + tools/doxygen/Doxyfile.core.internal | 6 + tools/run_tests/sources_and_headers.json | 179 +++++++++++++++-- vsprojects/buildtests_c.sln | 23 --- vsprojects/grpc.sln | 25 --- vsprojects/grpc_csharp_ext.sln | 2 - vsprojects/grpc_protoc_plugins.sln | 27 ++- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 36 +++- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 105 ++++++++++ .../grpc++_codegen_lib/grpc++_codegen_lib.vcxproj | 39 ++-- .../grpc++_codegen_lib.vcxproj.filters | 102 ++++++---- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 36 +++- .../grpc++_unsecure.vcxproj.filters | 105 ++++++++++ vsprojects/vcxproj/grpc/grpc.vcxproj | 9 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 24 +++ .../grpc_codegen_lib/grpc_codegen_lib.vcxproj | 12 +- .../grpc_codegen_lib.vcxproj.filters | 36 ++-- .../grpc_plugin_support.vcxproj | 3 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 9 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 24 +++ 30 files changed, 1193 insertions(+), 401 deletions(-) diff --git a/BUILD b/BUILD index 00620b6c66..1f27ecd50a 100644 --- a/BUILD +++ b/BUILD @@ -459,6 +459,12 @@ cc_library( "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/census.h", ], includes = [ @@ -469,7 +475,6 @@ cc_library( "//external:libssl", "//external:zlib", ":gpr", - ":grpc_codegen_lib", ], copts = [ "-std=gnu99", @@ -477,6 +482,42 @@ cc_library( ) +cc_library( + name = "grpc_codegen_lib", + srcs = [ + ], + hdrs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + "//external:protobuf_compiler", + ], +) + + cc_library( name = "grpc_unsecure", srcs = [ @@ -749,6 +790,12 @@ cc_library( "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/census.h", ], includes = [ @@ -757,7 +804,6 @@ cc_library( ], deps = [ ":gpr", - ":grpc_codegen_lib", ], copts = [ "-std=gnu99", @@ -827,6 +873,7 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", + "src/cpp/codegen/codegen_init.cc", ], hdrs = [ "include/grpc++/alarm.h", @@ -873,6 +920,37 @@ cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", ], includes = [ "include", @@ -882,7 +960,74 @@ cc_library( "//external:libssl", "//external:protobuf_clib", ":grpc", - ":grpc++_codegen_lib", + ], +) + + +cc_library( + name = "grpc++_codegen_lib", + srcs = [ + "src/cpp/codegen/codegen_init.cc", + ], + hdrs = [ + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + "//external:protobuf_compiler", ], ) @@ -919,6 +1064,7 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", + "src/cpp/codegen/codegen_init.cc", ], hdrs = [ "include/grpc++/alarm.h", @@ -965,6 +1111,37 @@ cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", ], includes = [ "include", @@ -974,7 +1151,6 @@ cc_library( "//external:protobuf_clib", ":gpr", ":grpc_unsecure", - ":grpc++_codegen_lib", ], ) @@ -1025,7 +1201,6 @@ cc_library( ], deps = [ "//external:protobuf_compiler", - ":grpc_codegen_lib", ":grpc++_codegen_lib", ], ) @@ -1332,6 +1507,12 @@ objc_library( "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/census.h", "src/core/census/grpc_filter.h", "src/core/channel/channel_args.h", @@ -1476,7 +1657,6 @@ objc_library( ], deps = [ ":gpr_objc", - ":grpc_codegen_lib_objc", "//external:libssl_objc", ], sdk_dylibs = ["libz"], diff --git a/Makefile b/Makefile index 4df450b6c5..21bfaa35ed 100644 --- a/Makefile +++ b/Makefile @@ -1123,7 +1123,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_certs.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc @@ -1138,7 +1138,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a ifeq ($(HAS_ZOOKEEPER),true) privatelibs_zookeeper: @@ -2534,6 +2534,12 @@ PUBLIC_HEADERS_C += \ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ include/grpc/census.h \ LIBGRPC_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_SRC)))) @@ -2562,18 +2568,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so endif @@ -2591,12 +2597,6 @@ endif LIBGRPC_CODEGEN_LIB_SRC = \ PUBLIC_HEADERS_C += \ - include/grpc/impl/codegen/byte_buffer.h \ - include/grpc/impl/codegen/compression_types.h \ - include/grpc/impl/codegen/connectivity_state.h \ - include/grpc/impl/codegen/grpc_types.h \ - include/grpc/impl/codegen/propagation_bits.h \ - include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ @@ -2611,6 +2611,12 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ LIBGRPC_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_CODEGEN_LIB_SRC)))) @@ -2862,6 +2868,12 @@ PUBLIC_HEADERS_C += \ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ include/grpc/census.h \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) @@ -2879,18 +2891,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a +$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_codegen_lib.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so endif @@ -3051,6 +3063,7 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ + src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -3097,6 +3110,37 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) @@ -3133,18 +3177,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp -lgrpc++_codegen_lib-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgrpc++_codegen_lib + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgrpc++_codegen_lib + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so endif @@ -3165,6 +3209,26 @@ LIBGRPC++_CODEGEN_LIB_SRC = \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ include/grpc++/impl/codegen/async_stream.h \ include/grpc++/impl/codegen/async_unary_call.h \ include/grpc++/impl/codegen/call.h \ @@ -3196,20 +3260,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/sync_no_cxx11.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ - include/grpc/impl/codegen/alloc.h \ - include/grpc/impl/codegen/atm.h \ - include/grpc/impl/codegen/atm_gcc_atomic.h \ - include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ - include/grpc/impl/codegen/log.h \ - include/grpc/impl/codegen/port_platform.h \ - include/grpc/impl/codegen/slice.h \ - include/grpc/impl/codegen/slice_buffer.h \ - include/grpc/impl/codegen/sync.h \ - include/grpc/impl/codegen/sync_generic.h \ - include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ - include/grpc/impl/codegen/time.h \ LIBGRPC++_CODEGEN_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_CODEGEN_LIB_SRC)))) @@ -3379,6 +3429,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ + src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ @@ -3425,6 +3476,37 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/config_protobuf.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -3451,18 +3533,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc++_codegen_lib.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp -lgrpc++_codegen_lib-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_codegen_lib.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc++_codegen_lib + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc++_codegen_lib + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so endif diff --git a/binding.gyp b/binding.gyp index 4b5dc4df81..d1e086cfa0 100644 --- a/binding.gyp +++ b/binding.gyp @@ -555,7 +555,6 @@ 'type': 'static_library', 'dependencies': [ 'gpr', - 'grpc_codegen_lib', ], 'sources': [ 'src/core/census/grpc_context.c', @@ -727,27 +726,6 @@ }] ] }, - { - 'cflags': [ - '-std=c99', - '-Wall', - '-Werror' - ], - 'target_name': 'grpc_codegen_lib', - 'product_prefix': 'lib', - 'type': 'static_library', - 'dependencies': [ - ], - 'sources': [ - ], - "conditions": [ - ['OS == "mac"', { - 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9' - } - }] - ] - }, { 'include_dirs': [ " + + + + + + diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index edd4ebff92..253262c9aa 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -803,7 +803,38 @@ include/grpc++/support/status_code_enum.h \ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ -include/grpc++/support/time.h +include/grpc++/support/time.h \ +include/grpc++/impl/codegen/async_stream.h \ +include/grpc++/impl/codegen/async_unary_call.h \ +include/grpc++/impl/codegen/call.h \ +include/grpc++/impl/codegen/call_hook.h \ +include/grpc++/impl/codegen/channel_interface.h \ +include/grpc++/impl/codegen/client_context.h \ +include/grpc++/impl/codegen/client_unary_call.h \ +include/grpc++/impl/codegen/completion_queue.h \ +include/grpc++/impl/codegen/completion_queue_tag.h \ +include/grpc++/impl/codegen/config.h \ +include/grpc++/impl/codegen/config_protobuf.h \ +include/grpc++/impl/codegen/core_codegen_interface.h \ +include/grpc++/impl/codegen/grpc_library.h \ +include/grpc++/impl/codegen/method_handler_impl.h \ +include/grpc++/impl/codegen/proto_utils.h \ +include/grpc++/impl/codegen/rpc_method.h \ +include/grpc++/impl/codegen/rpc_service_method.h \ +include/grpc++/impl/codegen/security/auth_context.h \ +include/grpc++/impl/codegen/serialization_traits.h \ +include/grpc++/impl/codegen/server_context.h \ +include/grpc++/impl/codegen/server_interface.h \ +include/grpc++/impl/codegen/service_type.h \ +include/grpc++/impl/codegen/status.h \ +include/grpc++/impl/codegen/status_code_enum.h \ +include/grpc++/impl/codegen/string_ref.h \ +include/grpc++/impl/codegen/stub_options.h \ +include/grpc++/impl/codegen/sync.h \ +include/grpc++/impl/codegen/sync_cxx11.h \ +include/grpc++/impl/codegen/sync_no_cxx11.h \ +include/grpc++/impl/codegen/sync_stream.h \ +include/grpc++/impl/codegen/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 554fcecb36..c4e77bbfe8 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -804,6 +804,37 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ +include/grpc++/impl/codegen/async_stream.h \ +include/grpc++/impl/codegen/async_unary_call.h \ +include/grpc++/impl/codegen/call.h \ +include/grpc++/impl/codegen/call_hook.h \ +include/grpc++/impl/codegen/channel_interface.h \ +include/grpc++/impl/codegen/client_context.h \ +include/grpc++/impl/codegen/client_unary_call.h \ +include/grpc++/impl/codegen/completion_queue.h \ +include/grpc++/impl/codegen/completion_queue_tag.h \ +include/grpc++/impl/codegen/config.h \ +include/grpc++/impl/codegen/config_protobuf.h \ +include/grpc++/impl/codegen/core_codegen_interface.h \ +include/grpc++/impl/codegen/grpc_library.h \ +include/grpc++/impl/codegen/method_handler_impl.h \ +include/grpc++/impl/codegen/proto_utils.h \ +include/grpc++/impl/codegen/rpc_method.h \ +include/grpc++/impl/codegen/rpc_service_method.h \ +include/grpc++/impl/codegen/security/auth_context.h \ +include/grpc++/impl/codegen/serialization_traits.h \ +include/grpc++/impl/codegen/server_context.h \ +include/grpc++/impl/codegen/server_interface.h \ +include/grpc++/impl/codegen/service_type.h \ +include/grpc++/impl/codegen/status.h \ +include/grpc++/impl/codegen/status_code_enum.h \ +include/grpc++/impl/codegen/string_ref.h \ +include/grpc++/impl/codegen/stub_options.h \ +include/grpc++/impl/codegen/sync.h \ +include/grpc++/impl/codegen/sync_cxx11.h \ +include/grpc++/impl/codegen/sync_no_cxx11.h \ +include/grpc++/impl/codegen/sync_stream.h \ +include/grpc++/impl/codegen/time.h \ src/cpp/client/secure_credentials.h \ src/cpp/common/core_codegen.h \ src/cpp/common/secure_auth_context.h \ @@ -842,7 +873,8 @@ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ -src/cpp/util/time.cc +src/cpp/util/time.cc \ +src/cpp/codegen/codegen_init.cc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 322a33f460..e326adcb1a 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -766,6 +766,12 @@ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ +include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/compression_types.h \ +include/grpc/impl/codegen/connectivity_state.h \ +include/grpc/impl/codegen/grpc_types.h \ +include/grpc/impl/codegen/propagation_bits.h \ +include/grpc/impl/codegen/status.h \ include/grpc/census.h \ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 040abc0095..71b7af2a22 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -766,6 +766,12 @@ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ +include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/compression_types.h \ +include/grpc/impl/codegen/connectivity_state.h \ +include/grpc/impl/codegen/grpc_types.h \ +include/grpc/impl/codegen/propagation_bits.h \ +include/grpc/impl/codegen/status.h \ include/grpc/census.h \ src/core/census/grpc_filter.h \ src/core/channel/channel_args.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 5ece411aeb..524eaaed18 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3896,8 +3896,7 @@ }, { "deps": [ - "gpr", - "grpc_codegen_lib" + "gpr" ], "headers": [ "include/grpc/byte_buffer.h", @@ -3906,6 +3905,12 @@ "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/grpc_security.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/grpc_filter.h", @@ -4053,6 +4058,12 @@ "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/grpc_security.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/context.c", @@ -4494,8 +4505,7 @@ }, { "deps": [ - "gpr", - "grpc_codegen_lib" + "gpr" ], "headers": [ "include/grpc/byte_buffer.h", @@ -4503,6 +4513,12 @@ "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/grpc_filter.h", @@ -4635,6 +4651,12 @@ "include/grpc/census.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", "include/grpc/status.h", "src/core/census/aggregation.h", "src/core/census/context.c", @@ -4955,8 +4977,7 @@ }, { "deps": [ - "grpc", - "grpc++_codegen_lib" + "grpc" ], "headers": [ "include/grpc++/alarm.h", @@ -4969,6 +4990,37 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -5026,6 +5078,37 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -5070,6 +5153,7 @@ "src/cpp/client/insecure_credentials.cc", "src/cpp/client/secure_credentials.cc", "src/cpp/client/secure_credentials.h", + "src/cpp/codegen/codegen_init.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", @@ -5104,9 +5188,7 @@ "type": "lib" }, { - "deps": [ - "grpc_codegen_lib" - ], + "deps": [], "headers": [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", @@ -5144,10 +5226,16 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", @@ -5193,10 +5281,16 @@ "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", "include/grpc/impl/codegen/slice.h", "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", @@ -5265,7 +5359,6 @@ { "deps": [ "gpr", - "grpc++_codegen_lib", "grpc_unsecure" ], "headers": [ @@ -5279,6 +5372,37 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -5332,6 +5456,37 @@ "include/grpc++/grpc++.h", "include/grpc++/impl/call.h", "include/grpc++/impl/client_unary_call.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/config_protobuf.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", "include/grpc++/impl/proto_utils.h", @@ -5374,6 +5529,7 @@ "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", + "src/cpp/codegen/codegen_init.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", "src/cpp/common/core_codegen.h", @@ -5401,8 +5557,7 @@ }, { "deps": [ - "grpc++_codegen_lib", - "grpc_codegen_lib" + "grpc++_codegen_lib" ], "headers": [ "include/grpc++/support/config.h", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 1641013524..413ed3e3f3 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -22,12 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{A828FD72-44CE-4EA5-8966-6E4624458D58}" - ProjectSection(myProperties) = preProject - lib = "True" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_dll", "vcxproj\.\grpc_dll\grpc_dll.vcxproj", "{A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}" @@ -65,7 +59,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" @@ -1413,22 +1406,6 @@ Global {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.ActiveCfg = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.ActiveCfg = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.ActiveCfg = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.ActiveCfg = Release|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.Build.0 = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.Build.0 = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.Build.0 = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.Build.0 = Release|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.Build.0 = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.Build.0 = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.ActiveCfg = Release|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.Build.0 = Release|x64 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|Win32.ActiveCfg = Debug|Win32 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|x64.ActiveCfg = Debug|x64 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index ffcc682329..3f6b337972 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -22,12 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{A828FD72-44CE-4EA5-8966-6E4624458D58}" - ProjectSection(myProperties) = preProject - lib = "True" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_dll", "vcxproj\.\grpc_dll\grpc_dll.vcxproj", "{A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}" @@ -65,7 +59,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "reconnect_server", "vcxproj\.\reconnect_server\reconnect_server.vcxproj", "{929C90AE-483F-AC80-EF93-226199F9E428}" @@ -97,7 +90,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" @@ -107,7 +99,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boringssl", "vcxproj\.\boringssl\boringssl.vcxproj", "{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}" @@ -238,22 +229,6 @@ Global {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release-DLL|x64.Build.0 = Release-DLL|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.ActiveCfg = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.ActiveCfg = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.ActiveCfg = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.ActiveCfg = Release|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.Build.0 = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.Build.0 = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.Build.0 = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.Build.0 = Release|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug-DLL|x64.Build.0 = Debug|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|Win32.Build.0 = Release|Win32 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.ActiveCfg = Release|x64 - {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release-DLL|x64.Build.0 = Release|x64 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|Win32.ActiveCfg = Debug|Win32 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug|x64.ActiveCfg = Debug|x64 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/grpc_csharp_ext.sln b/vsprojects/grpc_csharp_ext.sln index a4d78e198c..11d2204ba5 100644 --- a/vsprojects/grpc_csharp_ext.sln +++ b/vsprojects/grpc_csharp_ext.sln @@ -14,7 +14,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\grpc_unsecure\grpc_unsecure.vcxproj", "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" @@ -23,7 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_unsecure", "vcxproj\.\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_csharp_ext", "vcxproj\.\grpc_csharp_ext\grpc_csharp_ext.vcxproj", "{D64C6D63-4458-4A88-AB38-35678384A7E4}" diff --git a/vsprojects/grpc_protoc_plugins.sln b/vsprojects/grpc_protoc_plugins.sln index 7e4466acbb..9471aae138 100644 --- a/vsprojects/grpc_protoc_plugins.sln +++ b/vsprojects/grpc_protoc_plugins.sln @@ -3,12 +3,21 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_codegen_lib", "vcxproj\.\grpc_codegen_lib\grpc_codegen_lib.vcxproj", "{A828FD72-44CE-4EA5-8966-6E4624458D58}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_codegen_lib", "vcxproj\.\grpc++_codegen_lib\grpc++_codegen_lib.vcxproj", "{AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_plugin_support", "vcxproj\.\grpc_plugin_support\grpc_plugin_support.vcxproj", "{B6E81D84-2ACB-41B8-8781-493A944C7817}" ProjectSection(myProperties) = preProject lib = "True" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {A828FD72-44CE-4EA5-8966-6E4624458D58} = {A828FD72-44CE-4EA5-8966-6E4624458D58} {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} = {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} EndProjectSection EndProject @@ -60,6 +69,22 @@ Global Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.ActiveCfg = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.ActiveCfg = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.ActiveCfg = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.ActiveCfg = Release|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|Win32.Build.0 = Debug|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Debug|x64.Build.0 = Debug|x64 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|Win32.Build.0 = Release|Win32 + {A828FD72-44CE-4EA5-8966-6E4624458D58}.Release|x64.Build.0 = Release|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|Win32.ActiveCfg = Debug|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|x64.ActiveCfg = Debug|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|Win32.ActiveCfg = Release|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|x64.ActiveCfg = Release|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|Win32.Build.0 = Debug|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Debug|x64.Build.0 = Debug|x64 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|Win32.Build.0 = Release|Win32 + {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}.Release|x64.Build.0 = Release|x64 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|Win32.ActiveCfg = Debug|Win32 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Debug|x64.ActiveCfg = Debug|x64 {B6E81D84-2ACB-41B8-8781-493A944C7817}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 4e97f9cdd1..e71464e2a8 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -302,6 +302,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -375,14 +406,13 @@ + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 1ebc06f1f2..b54d4ced82 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -91,6 +91,9 @@ src\cpp\util + + src\cpp\codegen + @@ -225,6 +228,99 @@ include\grpc++\support + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + @@ -269,6 +365,12 @@ {0da8cd95-314f-da1b-5ce7-7791a5be1f1a} + + {a3e7f28b-a7c7-7364-d402-edb1bfa414a4} + + + {20cbcf00-994a-300a-5184-bda96c6f45e4} + {a80eb32b-1be9-1187-5f40-30d92accecc8} @@ -284,6 +386,9 @@ {7febf32a-d7a6-76fa-9e17-f189f591c062} + + {3c3e27f4-d3d9-3c42-5204-08b5e839f2de} + {2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b} diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj index 88c394757e..de2526bd87 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj @@ -147,6 +147,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -178,30 +198,11 @@ - - - - - - - - - - - - - - - - - {A828FD72-44CE-4EA5-8966-6E4624458D58} - - diff --git a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters index 8264435fb1..3cc00829d8 100644 --- a/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_codegen_lib/grpc++_codegen_lib.vcxproj.filters @@ -6,6 +6,66 @@ + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + include\grpc++\impl\codegen @@ -99,48 +159,6 @@ include\grpc++\impl\codegen - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 550fa153e4..39a0ff9008 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -302,6 +302,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -359,6 +390,8 @@ + + @@ -367,9 +400,6 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index dbf5c7c181..3bca2092d6 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -73,6 +73,9 @@ src\cpp\util + + src\cpp\codegen + @@ -207,6 +210,99 @@ include\grpc++\support + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + @@ -239,6 +335,12 @@ {dadc0002-f2ac-451b-a9b8-33b8de10b5fc} + + {ccc364e2-3f28-8bfc-c26e-800dd6f9a9af} + + + {87cae06e-f40c-8fb6-73d6-26c7482ed9da} + {64bf60ff-9192-bb59-dcc8-8a0021e1d016} @@ -254,6 +356,9 @@ {ff72923a-6499-8d2a-e0fb-6d574b85d77e} + + {18e9c249-37f0-7f2c-f026-502d48ed8c92} + {ed8e4daa-825f-fbe5-2a45-846ad9165d3d} diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 7ba49d1bea..4248ade4b2 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -273,6 +273,12 @@ + + + + + + @@ -739,9 +745,6 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - {A828FD72-44CE-4EA5-8966-6E4624458D58} - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 60a9f25a5b..31fb00388d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -501,6 +501,24 @@ include\grpc + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + include\grpc @@ -923,6 +941,12 @@ {880c644d-b84f-cfca-98bd-e145f36232ab} + + {38832702-fee1-b2bc-75d3-923e748dcde9} + + + {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} + {d538af37-07b2-062b-fa2a-d9f882cb2737} diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj index be8a6f7266..a6a5a858a4 100644 --- a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj @@ -147,12 +147,6 @@ - - - - - - @@ -167,6 +161,12 @@ + + + + + + diff --git a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters index 6ce52752fc..be1e623482 100644 --- a/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_codegen_lib/grpc_codegen_lib.vcxproj.filters @@ -1,24 +1,6 @@ - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - include\grpc\impl\codegen @@ -61,6 +43,24 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj index f5abfdd03a..058ae4fcb5 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -193,9 +193,6 @@ - - {A828FD72-44CE-4EA5-8966-6E4624458D58} - {AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 4a06e2d000..f0d869ba93 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -263,6 +263,12 @@ + + + + + + @@ -675,9 +681,6 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - {A828FD72-44CE-4EA5-8966-6E4624458D58} - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index cd67a32c0b..1f240212a3 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -438,6 +438,24 @@ include\grpc + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + include\grpc @@ -818,6 +836,12 @@ {77b9717b-b8d8-dd5f-14bb-a3e96809a70a} + + {10cfa248-c60f-376f-e7ae-2a7d7d8e81f5} + + + {03cc6735-c734-7017-4000-a435f29d55c3} + {aaf326a1-c884-46ea-875a-cbbd9983e539} -- cgit v1.2.3 From b9012fc03c91a81429ac650492dee5184d6adc47 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 14 Mar 2016 23:19:04 +0100 Subject: Fixing bitrotting in udp_server_test.c --- src/core/iomgr/pollset.h | 12 ++++++------ test/core/iomgr/udp_server_test.c | 22 ++++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/core/iomgr/pollset.h b/src/core/iomgr/pollset.h index 92a0374ddd..ee1debfb71 100644 --- a/src/core/iomgr/pollset.h +++ b/src/core/iomgr/pollset.h @@ -55,7 +55,7 @@ typedef struct grpc_pollset_worker grpc_pollset_worker; size_t grpc_pollset_size(void); void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu); /* Begin shutting down the pollset, and call closure when done. - * GRPC_POLLSET_MU(pollset) must be held */ + * pollset's mutex must be held */ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_closure *closure); /** Reset the pollset to its initial state (perhaps with some cached objects); @@ -66,16 +66,16 @@ void grpc_pollset_destroy(grpc_pollset *pollset); /* Do some work on a pollset. May involve invoking asynchronous callbacks, or actually polling file descriptors. - Requires GRPC_POLLSET_MU(pollset) locked. - May unlock GRPC_POLLSET_MU(pollset) during its execution. + Requires pollset's mutex locked. + May unlock its mutex during its execution. worker is a (platform-specific) handle that can be used to wake up from grpc_pollset_work before any events are received and before the timeout has expired. It is both initialized and destroyed by grpc_pollset_work. Initialization of worker is guaranteed to occur BEFORE the - GRPC_POLLSET_MU(pollset) is released for the first time by - grpc_pollset_work, and it is guaranteed that GRPC_POLLSET_MU(pollset) will - not be released by grpc_pollset_work AFTER worker has been destroyed. + pollset's mutex is released for the first time by grpc_pollset_work + and it is guaranteed that it will not be released by grpc_pollset_work + AFTER worker has been destroyed. Tries not to block past deadline. May call grpc_closure_list_run on grpc_closure_list, without holding the diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 2e253d8a8a..ce3c23b4bf 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -31,8 +31,9 @@ * */ -#include "src/core/iomgr/udp_server.h" #include "src/core/iomgr/iomgr.h" +#include "src/core/iomgr/pollset_posix.h" +#include "src/core/iomgr/udp_server.h" #include #include #include @@ -48,6 +49,7 @@ #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", #x) static grpc_pollset g_pollset; +static gpr_mu *g_mu; static int g_number_of_reads = 0; static int g_number_of_bytes_read = 0; @@ -56,14 +58,14 @@ static void on_read(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, char read_buffer[512]; ssize_t byte_count; - gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_lock(g_mu); byte_count = recv(emfd->fd, read_buffer, sizeof(read_buffer), 0); g_number_of_reads++; g_number_of_bytes_read += (int)byte_count; grpc_pollset_kick(&g_pollset, NULL); - gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_unlock(g_mu); } static void test_no_op(void) { @@ -142,7 +144,7 @@ static void test_receive(int number_of_clients) { pollsets[0] = &g_pollset; grpc_udp_server_start(&exec_ctx, s, pollsets, 1, NULL); - gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_lock(g_mu); for (i = 0; i < number_of_clients; i++) { deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10); @@ -155,19 +157,19 @@ static void test_receive(int number_of_clients) { GPR_ASSERT(5 == write(clifd, "hello", 5)); while (g_number_of_reads == number_of_reads_before && gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) { - grpc_pollset_worker worker; + grpc_pollset_worker *worker = NULL; grpc_pollset_work(&exec_ctx, &g_pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC), deadline); - gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_lock(g_mu); } GPR_ASSERT(g_number_of_reads == number_of_reads_before + 1); close(clifd); } GPR_ASSERT(g_number_of_bytes_read == 5 * number_of_clients); - gpr_mu_unlock(GRPC_POLLSET_MU(&g_pollset)); + gpr_mu_unlock(g_mu); grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); @@ -181,8 +183,8 @@ int main(int argc, char **argv) { grpc_closure destroyed; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_test_init(argc, argv); - grpc_iomgr_init(); - grpc_pollset_init(&g_pollset); + grpc_init(); + grpc_pollset_init(&g_pollset, &g_mu); test_no_op(); test_no_op_with_start(); -- cgit v1.2.3 From 80da2ec697de3b5a5a6fc0669aa4429e51971563 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 15 Mar 2016 18:56:34 +0100 Subject: Preventing huge stacks in load_file_test. --- test/core/support/load_file_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/core/support/load_file_test.c b/test/core/support/load_file_test.c index e6ba617440..70189b739d 100644 --- a/test/core/support/load_file_test.c +++ b/test/core/support/load_file_test.c @@ -135,33 +135,33 @@ static void test_load_big_file(void) { gpr_slice slice; int success; char *tmp_name; - unsigned char buffer[124631]; + static const size_t buffer_size = 124631; + unsigned char *buffer = gpr_malloc(buffer_size); unsigned char *current; size_t i; LOG_TEST_NAME("test_load_big_file"); - for (i = 0; i < sizeof(buffer); i++) { - buffer[i] = 42; - } + memset(buffer, 42, buffer_size); tmp = gpr_tmpfile(prefix, &tmp_name); GPR_ASSERT(tmp != NULL); GPR_ASSERT(tmp_name != NULL); - GPR_ASSERT(fwrite(buffer, 1, sizeof(buffer), tmp) == sizeof(buffer)); + GPR_ASSERT(fwrite(buffer, 1, buffer_size, tmp) == buffer_size); fclose(tmp); slice = gpr_load_file(tmp_name, 0, &success); GPR_ASSERT(success == 1); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == sizeof(buffer)); + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == buffer_size); current = GPR_SLICE_START_PTR(slice); - for (i = 0; i < sizeof(buffer); i++) { + for (i = 0; i < buffer_size; i++) { GPR_ASSERT(current[i] == 42); } remove(tmp_name); gpr_free(tmp_name); gpr_slice_unref(slice); + gpr_free(buffer); } int main(int argc, char **argv) { -- cgit v1.2.3 From 2b6feb8df0da5cf676d0e69212050a8b579133d1 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 15 Mar 2016 18:56:45 +0100 Subject: Preventing huge stacks in timer_heap_test. --- test/core/iomgr/timer_heap_test.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/core/iomgr/timer_heap_test.c b/test/core/iomgr/timer_heap_test.c index cd34696f7d..dd23a99520 100644 --- a/test/core/iomgr/timer_heap_test.c +++ b/test/core/iomgr/timer_heap_test.c @@ -177,11 +177,12 @@ static void test2(void) { grpc_timer_heap pq; - elem_struct elems[1000]; + static const size_t elems_size = 1000; + elem_struct *elems = gpr_malloc(elems_size * sizeof(elem_struct)); size_t num_inserted = 0; grpc_timer_heap_init(&pq); - memset(elems, 0, sizeof(elems)); + memset(elems, 0, elems_size); for (size_t round = 0; round < 10000; round++) { int r = rand() % 1000; @@ -209,7 +210,7 @@ static void test2(void) { if (num_inserted > 0) { grpc_timer *top = grpc_timer_heap_top(&pq); grpc_timer_heap_pop(&pq); - for (size_t i = 0; i < GPR_ARRAY_SIZE(elems); i++) { + for (size_t i = 0; i < elems_size; i++) { if (top == &elems[i].elem) { GPR_ASSERT(elems[i].inserted); elems[i].inserted = false; @@ -222,7 +223,7 @@ static void test2(void) { if (num_inserted) { gpr_timespec *min_deadline = NULL; - for (size_t i = 0; i < GPR_ARRAY_SIZE(elems); i++) { + for (size_t i = 0; i < elems_size; i++) { if (elems[i].inserted) { if (min_deadline == NULL) { min_deadline = &elems[i].elem.deadline; @@ -239,6 +240,7 @@ static void test2(void) { } grpc_timer_heap_destroy(&pq); + gpr_free(elems); } static void shrink_test(void) { -- cgit v1.2.3 From 1faa036a490a6a541047d3440b8a5e084157bbb9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 15 Mar 2016 21:28:09 +0100 Subject: Disabling flaky test. --- test/core/census/mlog_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/core/census/mlog_test.c b/test/core/census/mlog_test.c index 5b6c5946ab..000ac7335a 100644 --- a/test/core/census/mlog_test.c +++ b/test/core/census/mlog_test.c @@ -332,7 +332,7 @@ static void multiple_writers_single_reader(int circular_log) { static void setup_test(int circular_log) { census_log_initialize(LOG_SIZE_IN_MB, circular_log); - GPR_ASSERT(census_log_remaining_space() == LOG_SIZE_IN_BYTES); + // GPR_ASSERT(census_log_remaining_space() == LOG_SIZE_IN_BYTES); } // Attempts to create a record of invalid size (size > @@ -352,8 +352,8 @@ void test_invalid_record_size(void) { // check can fail if the thread is context switched to a new CPU during the // start_write execution (multiple blocks get allocated), but this has not // been observed in practice. - GPR_ASSERT(LOG_SIZE_IN_BYTES - CENSUS_LOG_MAX_RECORD_SIZE == - census_log_remaining_space()); + // GPR_ASSERT(LOG_SIZE_IN_BYTES - CENSUS_LOG_MAX_RECORD_SIZE == + // census_log_remaining_space()); census_log_shutdown(); } -- cgit v1.2.3 From 4268318f7747a82a254ba61c57a9dab7c002bc67 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 17 Mar 2016 00:25:39 +0100 Subject: Moving core_codegen.cc to the proper filegroup. --- BUILD | 3 ++- Makefile | 4 ++-- build.yaml | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/run_tests/sources_and_headers.json | 1 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 4 ++-- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 +++--- vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj | 2 ++ vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters | 3 +++ 9 files changed, 17 insertions(+), 10 deletions(-) diff --git a/BUILD b/BUILD index 1f27ecd50a..06c3f61e1d 100644 --- a/BUILD +++ b/BUILD @@ -845,7 +845,6 @@ cc_library( "src/cpp/server/thread_pool_interface.h", "src/cpp/client/secure_credentials.cc", "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/core_codegen.cc", "src/cpp/common/secure_auth_context.cc", "src/cpp/common/secure_channel_arguments.cc", "src/cpp/common/secure_create_auth_context.cc", @@ -859,6 +858,7 @@ cc_library( "src/cpp/client/insecure_credentials.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", "src/cpp/common/rpc_method.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", @@ -1050,6 +1050,7 @@ cc_library( "src/cpp/client/insecure_credentials.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", "src/cpp/common/rpc_method.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", diff --git a/Makefile b/Makefile index 21bfaa35ed..578449d31f 100644 --- a/Makefile +++ b/Makefile @@ -3035,7 +3035,6 @@ endif LIBGRPC++_SRC = \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ - src/cpp/common/core_codegen.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ @@ -3049,6 +3048,7 @@ LIBGRPC++_SRC = \ src/cpp/client/insecure_credentials.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ + src/cpp/common/core_codegen.cc \ src/cpp/common/rpc_method.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ @@ -3415,6 +3415,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/client/insecure_credentials.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ + src/cpp/common/core_codegen.cc \ src/cpp/common/rpc_method.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ @@ -13301,7 +13302,6 @@ src/core/tsi/ssl_transport_security.c: $(OPENSSL_DEP) src/core/tsi/transport_security.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) -src/cpp/common/core_codegen.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP) src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 69647f8bb6..0e68c80fb0 100644 --- a/build.yaml +++ b/build.yaml @@ -187,6 +187,7 @@ filegroups: - src/cpp/client/insecure_credentials.cc - src/cpp/common/channel_arguments.cc - src/cpp/common/completion_queue.cc + - src/cpp/common/core_codegen.cc - src/cpp/common/rpc_method.cc - src/cpp/server/async_generic_service.cc - src/cpp/server/create_default_thread_pool.cc @@ -735,7 +736,6 @@ libs: src: - src/cpp/client/secure_credentials.cc - src/cpp/common/auth_property_iterator.cc - - src/cpp/common/core_codegen.cc - src/cpp/common/secure_auth_context.cc - src/cpp/common/secure_channel_arguments.cc - src/cpp/common/secure_create_auth_context.cc diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index c4e77bbfe8..134b16f485 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -846,7 +846,6 @@ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ -src/cpp/common/core_codegen.cc \ src/cpp/common/secure_auth_context.cc \ src/cpp/common/secure_channel_arguments.cc \ src/cpp/common/secure_create_auth_context.cc \ @@ -860,6 +859,7 @@ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/completion_queue.cc \ +src/cpp/common/core_codegen.cc \ src/cpp/common/rpc_method.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 524eaaed18..50e676f2aa 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5532,6 +5532,7 @@ "src/cpp/codegen/codegen_init.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/completion_queue.cc", + "src/cpp/common/core_codegen.cc", "src/cpp/common/core_codegen.h", "src/cpp/common/create_auth_context.h", "src/cpp/common/insecure_create_auth_context.cc", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index e71464e2a8..d29e68902f 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -350,8 +350,6 @@ - - @@ -378,6 +376,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index b54d4ced82..c9b3bb9500 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -7,9 +7,6 @@ src\cpp\common - - src\cpp\common - src\cpp\common @@ -49,6 +46,9 @@ src\cpp\common + + src\cpp\common + src\cpp\common diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 39a0ff9008..3d1aee09bd 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -362,6 +362,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 3bca2092d6..70a23bfae1 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -31,6 +31,9 @@ src\cpp\common + + src\cpp\common + src\cpp\common -- cgit v1.2.3 From 2befb68e82f81c15e06eff637de884ba76f48e20 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 17:16:02 -0700 Subject: Tweaking formatting --- test/core/util/test_config.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 15ba78413c..5d4f659fb1 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -33,13 +33,13 @@ #include "test/core/util/test_config.h" -#include #include -#include "src/core/support/string.h" -#include +#include #include -#include #include +#include +#include +#include "src/core/support/string.h" double g_fixture_slowdown_factor = 1.0; @@ -54,8 +54,8 @@ static unsigned seed(void) { return _getpid(); } #endif #if GPR_WINDOWS_CRASH_HANDLER -#include #include +#include #define DBGHELP_TRANSLATE_TCHAR #include @@ -93,8 +93,8 @@ static void print_current_stack() { frames = frames < MAX_CALLERS_SHOWN ? frames : MAX_CALLERS_SHOWN; for (unsigned int i = 0; i < frames; i++) { SymFromAddrW(process, (DWORD64)(callers_stack[i]), 0, symbol); - fwprintf(stderr, L"*** %d: %016I64LX %ls - 0x%0X\n", i, - (DWORD64)callers_stack[i], symbol->Name, symbol->Address); + fwprintf(stderr, L"*** %d: %016I64LX %ls - %016I64LX\n", i, + (DWORD64)callers_stack[i], symbol->Name, (DWORD64)symbol->Address); } free(symbol); @@ -147,8 +147,9 @@ static void print_stack_from_context(CONTEXT c) { SymFunctionTableAccess, SymGetModuleBase, 0)) { BOOL has_symbol = SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol); - fwprintf(stderr, L"*** %016I64LX %ls - 0x%0X\n", (DWORD64)(s.AddrPC.Offset), - has_symbol ? symbol->Name : L"<>", symbol->Address); + fwprintf( + stderr, L"*** %016I64LX %ls - %016I64LX\n", (DWORD64)(s.AddrPC.Offset), + has_symbol ? symbol->Name : L"<>", (DWORD64)symbol->Address); } free(symbol); @@ -178,7 +179,7 @@ static LONG crash_handler(struct _EXCEPTION_POINTERS *ex_info) { } static void abort_handler(int sig) { - fprintf(stderr, "Abort handler called."); + fprintf(stderr, "Abort handler called.\n"); print_current_stack(NULL); if (IsDebuggerPresent()) { __debugbreak(); @@ -189,7 +190,7 @@ static void abort_handler(int sig) { static void install_crash_handler() { if (!SymInitialize(GetCurrentProcess(), NULL, TRUE)) { - fprintf(stderr, "SymInitialize failed: %d", GetLastError()); + fprintf(stderr, "SymInitialize failed: %d\n", GetLastError()); } SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)crash_handler); _set_abort_behavior(0, _WRITE_ABORT_MSG); @@ -197,11 +198,11 @@ static void install_crash_handler() { signal(SIGABRT, abort_handler); } #elif GPR_POSIX_CRASH_HANDLER +#include #include +#include #include #include -#include -#include static char g_alt_stack[MINSIGSTKSZ]; -- cgit v1.2.3 From b195792ed92dbed8b7226cb1311eaccd12afab07 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 17:22:57 -0700 Subject: Drop the L --- test/core/util/test_config.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 5d4f659fb1..bd3c50d736 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -54,8 +54,10 @@ static unsigned seed(void) { return _getpid(); } #endif #if GPR_WINDOWS_CRASH_HANDLER -#include #include + +#include + #define DBGHELP_TRANSLATE_TCHAR #include @@ -93,7 +95,7 @@ static void print_current_stack() { frames = frames < MAX_CALLERS_SHOWN ? frames : MAX_CALLERS_SHOWN; for (unsigned int i = 0; i < frames; i++) { SymFromAddrW(process, (DWORD64)(callers_stack[i]), 0, symbol); - fwprintf(stderr, L"*** %d: %016I64LX %ls - %016I64LX\n", i, + fwprintf(stderr, L"*** %d: %016I64X %ls - %016I64X\n", i, (DWORD64)callers_stack[i], symbol->Name, (DWORD64)symbol->Address); } @@ -148,7 +150,7 @@ static void print_stack_from_context(CONTEXT c) { BOOL has_symbol = SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol); fwprintf( - stderr, L"*** %016I64LX %ls - %016I64LX\n", (DWORD64)(s.AddrPC.Offset), + stderr, L"*** %016I64X %ls - %016I64X\n", (DWORD64)(s.AddrPC.Offset), has_symbol ? symbol->Name : L"<>", (DWORD64)symbol->Address); } -- cgit v1.2.3 From 2ed1a9e32960c7ff60db41859c9a5b8f55867db7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 16 Mar 2016 20:09:43 -0700 Subject: Disable warning: system header is broken --- test/core/util/test_config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index bd3c50d736..bf672e8f67 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -58,6 +58,8 @@ static unsigned seed(void) { return _getpid(); } #include +// disable warning 4091 - dbghelp.h is broken for msvc2015 +#pragma warning(disable : 4091) #define DBGHELP_TRANSLATE_TCHAR #include -- cgit v1.2.3