diff --git a/Makefile b/Makefile index cce7118829f..8b967adcc44 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_dll.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 @@ -2540,6 +2540,44 @@ endif endif +LIBGRPC_DLL_SRC = \ + grpc.def \ + + +LIBGRPC_DLL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_DLL_SRC)))) + + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL. + +$(LIBDIR)/$(CONFIG)/libgrpc_dll.a: openssl_dep_error + + +else + + +$(LIBDIR)/$(CONFIG)/libgrpc_dll.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_DLL_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_dll.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc_dll.a $(LIBGRPC_DLL_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc_dll.a +endif + + + + +endif + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC_DLL_OBJS:.o=.dep) +endif +endif + + LIBGRPC_TEST_UTIL_SRC = \ test/core/end2end/data/server1_cert.c \ test/core/end2end/data/server1_key.c \ @@ -12952,6 +12990,7 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. +grpc.def: $(OPENSSL_DEP) src/core/httpcli/httpcli_security_connector.c: $(OPENSSL_DEP) src/core/security/base64.c: $(OPENSSL_DEP) src/core/security/client_auth_filter.c: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index dc7fce3213f..5a42e1386a3 100644 --- a/build.yaml +++ b/build.yaml @@ -587,6 +587,26 @@ libs: - grpc.dependencies.openssl - grpc.dependencies.zlib vs_project_guid: '{29D16885-7228-4C31-81ED-5F9187C7F2A9}' +- name: grpc_dll + build: private + language: c + src: + - grpc.def + deps: + - grpc + - gpr + deps_linkage: static + dll: only + vs_config_type: DynamicLibrary + vs_packages: + - grpc.dependencies.openssl + - grpc.dependencies.zlib + vs_project_guid: '{A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}' + vs_props: + - zlib + - openssl + - winsock + - global - name: grpc_test_util build: private language: c diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index a5ff6b51b82..028f7272e6e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3414,6 +3414,18 @@ "src/core/tsi/transport_security_interface.h" ] }, + { + "deps": [ + "gpr", + "grpc" + ], + "headers": [], + "language": "c", + "name": "grpc_dll", + "src": [ + "grpc.def" + ] + }, { "deps": [ "gpr", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index b30941ff738..0f754c1b843 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -24,6 +24,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_dll", "vcxproj\.\grpc_dll\grpc_dll.vcxproj", "{A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + 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" @@ -1375,6 +1384,18 @@ 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 + {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 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|x64.ActiveCfg = Release|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.Build.0 = Release-DLL|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 ad9198341ad..41a227434f9 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -24,6 +24,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "vcxproj\.\grpc\grpc {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_dll", "vcxproj\.\grpc_dll\grpc_dll.vcxproj", "{A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + 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" @@ -220,6 +229,18 @@ 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 + {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 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release|x64.ActiveCfg = Release|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|Win32.ActiveCfg = Debug-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|Win32.Build.0 = Debug-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|x64.ActiveCfg = Debug-DLL|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Debug-DLL|x64.Build.0 = Debug-DLL|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.ActiveCfg = Release-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.Build.0 = Release-DLL|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/vcxproj/grpc_dll/grpc_dll.vcxproj b/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj new file mode 100644 index 00000000000..a4ba4fdff34 --- /dev/null +++ b/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj @@ -0,0 +1,193 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + + grpc_dll + static + Debug + static + Debug + + + grpc_dll + static + Release + static + Release + + + + 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 + + + + + + + + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + 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_dll/grpc_dll.vcxproj.filters b/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj.filters new file mode 100644 index 00000000000..eb012a641d4 --- /dev/null +++ b/vsprojects/vcxproj/grpc_dll/grpc_dll.vcxproj.filters @@ -0,0 +1,15 @@ + + + + + + + + + + + {4e0e4342-caa8-2d9f-65d2-1430409e58a9} + + + +