diff --git a/Makefile b/Makefile index 61676c2ce17..8c6fc3220da 100644 --- a/Makefile +++ b/Makefile @@ -3201,13 +3201,6 @@ $(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LI $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a $(Q) $(AR) rcs $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) - $(Q) rm -rf tmp-merge-grpc++ - $(Q) mkdir tmp-merge-grpc++ - $(Q) ( cd tmp-merge-grpc++ ; $(AR) x ../$(LIBDIR)/$(CONFIG)/libgrpc++.a ) - $(Q) for l in $(OPENSSL_MERGE_LIBS) ; do ( cd tmp-merge-grpc++ ; ar x ../$${l} ) ; done - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a tmp-merge-grpc++/__.SYMDEF* - $(Q) ar rcs $(LIBDIR)/$(CONFIG)/libgrpc++.a tmp-merge-grpc++/* - $(Q) rm -rf tmp-merge-grpc++ ifeq ($(SYSTEM),Darwin) $(Q) ranlib $(LIBDIR)/$(CONFIG)/libgrpc++.a endif @@ -3218,15 +3211,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP)$(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT)$(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++.def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++-imp.a -o $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++.def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++-imp.a -o $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc-imp else $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc $(Q) ln -sf libgrpc++.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++.so.0 $(Q) ln -sf libgrpc++.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++.so endif @@ -3623,15 +3616,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/grpc_csharp_ext.$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP)$(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT)$(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext.def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext-imp.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext.$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) -lgpr-imp -lgrpc-imp + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext.def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext-imp.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext.$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) -lgpr-imp -lgrpc-imp else $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) -lgpr -lgrpc + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) -lgpr -lgrpc else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS) -lgpr -lgrpc + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) -lgpr -lgrpc $(Q) ln -sf libgrpc_csharp_ext.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.so.0 $(Q) ln -sf libgrpc_csharp_ext.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.so endif diff --git a/build.json b/build.json index d65e865ff95..c9500ebe1bd 100644 --- a/build.json +++ b/build.json @@ -330,7 +330,7 @@ "src/core/support/time_posix.c", "src/core/support/time_win32.c" ], - "secure": false, + "secure": "no", "vs_project_guid": "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}" }, { @@ -398,7 +398,7 @@ "filegroups": [ "grpc_base" ], - "secure": true, + "secure": "yes", "vs_project_guid": "{29D16885-7228-4C31-81ED-5F9187C7F2A9}" }, { @@ -438,7 +438,7 @@ "filegroups": [ "grpc_base" ], - "secure": false, + "secure": "no", "vs_project_guid": "{46CEDFFF-9692-456A-AA24-38B5D6BCF4C5}" }, { @@ -457,7 +457,7 @@ "filegroups": [ "grpc++_base" ], - "secure": true, + "secure": "check", "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}" }, { @@ -483,7 +483,7 @@ "filegroups": [ "grpc++_base" ], - "secure": false + "secure": "no" }, { "name": "pubsub_client_lib", @@ -1711,7 +1711,7 @@ "src/compiler/cpp_plugin.cc" ], "deps": [], - "secure": false + "secure": "no" }, { "name": "grpc_python_plugin", @@ -1725,7 +1725,7 @@ "src/compiler/python_plugin.cc" ], "deps": [], - "secure": false + "secure": "no" }, { "name": "grpc_ruby_plugin", @@ -1736,7 +1736,7 @@ "src/compiler/ruby_plugin.cc" ], "deps": [], - "secure": false + "secure": "no" }, { "name": "interop_client", diff --git a/templates/Makefile.template b/templates/Makefile.template index a6d84dba8e4..6573e03f7f5 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -917,7 +917,7 @@ PUBLIC_HEADERS_C += \\ LIB${lib.name.upper()}_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIB${lib.name.upper()}_SRC)))) ## If the library requires OpenSSL with ALPN, let's add some restrictions. -% if lib.get('secure', True): +% if lib.get('secure', 'check') == 'yes' or lib.get('secure', 'check') == 'check': ifeq ($(NO_SECURE),true) # You can't build secure libraries if you don't have OpenSSL with ALPN. @@ -993,7 +993,7 @@ $(LIBDIR)/$(CONFIG)/lib${lib.name}.a: $(ZLIB_DEP)\ $(Q) rm -f $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(Q) $(AR) rcs $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) % if lib.get('baselib', False): -% if lib.get('secure', True): +% if lib.get('secure', 'check') == 'yes': $(Q) rm -rf tmp-merge-${lib.name} $(Q) mkdir tmp-merge-${lib.name} $(Q) ( cd tmp-merge-${lib.name} ; $(AR) x ../$(LIBDIR)/$(CONFIG)/lib${lib.name}.a ) @@ -1028,8 +1028,10 @@ endif mingw_libs = mingw_libs + ' -l' + dep + '-imp' mingw_lib_deps = mingw_lib_deps + '$(LIBDIR)/$(CONFIG)/' + dep + '.$(SHARED_EXT)' - if lib.get('secure', True): + if lib.get('secure', 'check') == 'yes': common = common + ' $(LDLIBS_SECURE) $(OPENSSL_MERGE_LIBS)' + + if lib.get('secure', 'check') == 'yes' or lib.get('secure', 'check') == 'check': lib_deps = lib_deps + ' $(OPENSSL_DEP)' mingw_lib_deps = mingw_lib_deps + ' $(OPENSSL_DEP)' @@ -1056,7 +1058,7 @@ else endif endif % endif -% if lib.get('secure', True): +% if lib.get('secure', 'check') == 'yes' or lib.get('secure', 'check') == 'check': ## If the lib was secure, we have to close the Makefile's if that tested ## the presence of an ALPN-capable OpenSSL. @@ -1069,13 +1071,13 @@ endif endif % endif -% if lib.get('secure', True): +% if lib.get('secure', 'check') == 'yes' or lib.get('secure', 'check') == 'check': ifneq ($(NO_SECURE),true) % endif ifneq ($(NO_DEPS),true) -include $(LIB${lib.name.upper()}_OBJS:.o=.dep) endif -% if lib.get('secure', True): +% if lib.get('secure', 'check') == 'yes' or lib.get('secure', 'check') == 'check': endif % endif @@ -1102,7 +1104,7 @@ ${tgt.name.upper()}_SRC = \\ ${tgt.name.upper()}_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(${tgt.name.upper()}_SRC)))) -% if tgt.get('secure', True): +% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL with ALPN. @@ -1176,7 +1178,7 @@ $(BINDIR)/$(CONFIG)/${tgt.name}: $(${tgt.name.upper()}_OBJS)\ % endif % if tgt.build == 'protoc': $(HOST_LDLIBS_PROTOC)\ -% elif tgt.get('secure', True): +% elif tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': $(LDLIBS_SECURE)\ % endif -o $(BINDIR)/$(CONFIG)/${tgt.name} @@ -1184,7 +1186,7 @@ $(BINDIR)/$(CONFIG)/${tgt.name}: $(${tgt.name.upper()}_OBJS)\ endif % endif -% if tgt.get('secure', True): +% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': endif % endif @@ -1199,13 +1201,13 @@ $(OBJDIR)/$(CONFIG)/${os.path.splitext(src)[0]}.o: \ deps_${tgt.name}: $(${tgt.name.upper()}_OBJS:.o=.dep) -% if tgt.get('secure', True): +% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': ifneq ($(NO_SECURE),true) % endif ifneq ($(NO_DEPS),true) -include $(${tgt.name.upper()}_OBJS:.o=.dep) endif -% if tgt.get('secure', True): +% if tgt.get('secure', 'check') == 'yes' or tgt.get('secure', 'check') == 'check': endif % endif diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_json.py index 96d85557992..67fc0a6e539 100755 --- a/test/core/end2end/gen_build_json.py +++ b/test/core/end2end/gen_build_json.py @@ -107,7 +107,7 @@ def main(): 'name': 'end2end_fixture_%s' % f, 'build': 'private', 'language': 'c', - 'secure': True, + 'secure': 'check', 'src': ['test/core/end2end/fixtures/%s.c' % f] } for f in END2END_FIXTURES] + [ @@ -115,7 +115,7 @@ def main(): 'name': 'end2end_test_%s' % t, 'build': 'private', 'language': 'c', - 'secure': False, + 'secure': 'no', 'src': ['test/core/end2end/tests/%s.c' % t], 'headers': ['test/core/end2end/tests/cancel_test_helpers.h'] }