support static linkage for dependencies

pull/4688/head
Jan Tattermusch 9 years ago
parent 2eeae979d8
commit 324140c2e9
  1. 3
      build.yaml
  2. 7
      templates/Makefile.template

@ -797,8 +797,9 @@ libs:
src:
- src/csharp/ext/grpc_csharp_ext.c
deps:
- gpr
- grpc
- gpr
deps_linkage: static
dll: only
vs_config_type: DynamicLibrary
vs_packages:

@ -1645,6 +1645,13 @@
if lib.language == 'c++':
lib_deps += ' $(PROTOBUF_DEP)'
mingw_lib_deps += ' $(PROTOBUF_DEP)'
if lib.get('deps_linkage', None) == 'static':
for dep in lib.get('deps', []):
lib_archive = '$(LIBDIR)/$(CONFIG)/lib' + dep + '.a'
common = common + ' ' + lib_archive
lib_deps = lib_deps + ' ' + lib_archive
mingw_lib_deps = mingw_lib_deps + ' ' + lib_archive
else:
for dep in lib.get('deps', []):
libs = libs + ' -l' + dep
lib_deps = lib_deps + ' $(LIBDIR)/$(CONFIG)/lib' + dep + '.$(SHARED_EXT)'

Loading…
Cancel
Save