diff --git a/Makefile b/Makefile index 5895e49b27e..d254fd6ecbf 100644 --- a/Makefile +++ b/Makefile @@ -3407,9 +3407,11 @@ ifeq ($(CONFIG),opt) $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[STRIP] Stripping libgrpc_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a +ifeq ($(HAS_ZOOKEEPER),true) $(E) "[STRIP] Stripping libgrpc_zookeeper.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_zookeeper.a endif +endif strip-static_cxx: static_cxx ifeq ($(CONFIG),opt) @@ -3417,9 +3419,6 @@ ifeq ($(CONFIG),opt) $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(E) "[STRIP] Stripping libgrpc++_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a - -ifeq ($(HAS_ZOOKEEPER),true) -endif endif strip-shared_c: shared_c diff --git a/templates/Makefile.template b/templates/Makefile.template index 75fd6725968..1b898efbdda 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1143,39 +1143,38 @@ ifeq ($(CONFIG),opt) % for lib in libs: % if lib.language == "c": % if lib.build == "all": +% if not lib.get('external_deps', None): $(E) "[STRIP] Stripping lib${lib.name}.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a % endif % endif +% endif % endfor -endif - -strip-static_cxx: static_cxx -ifeq ($(CONFIG),opt) +ifeq ($(HAS_ZOOKEEPER),true) % for lib in libs: -% if lib.language == "c++": +% if lib.language == "c": % if lib.build == "all": -% if not lib.get('external_deps', None): +% if 'zookeeper' in lib.get('external_deps', []): $(E) "[STRIP] Stripping lib${lib.name}.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a % endif % endif % endif % endfor +endif +endif -ifeq ($(HAS_ZOOKEEPER),true) +strip-static_cxx: static_cxx +ifeq ($(CONFIG),opt) % for lib in libs: % if lib.language == "c++": % if lib.build == "all": -% if 'zookeeper' in lib.get('external_deps', []): - $(E) "[STRIP] Stripping lib${lib.name}.a" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a -% endif + $(E) "[STRIP] Stripping lib${lib.name}.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a % endif % endif % endfor endif -endif strip-shared_c: shared_c ifeq ($(CONFIG),opt)