From 170668d83911c12475eccf69eba5e191863d4a56 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 17 Apr 2013 12:40:20 +0200 Subject: gbuild: MSVC: only re-link libraries if exported symbols change Implement commit 3213cd54b76bc80a6f0516aac75a48ff3b2ad67c for MSVC. Not sure what the extra "Summary" section at the end of the output does, and whether it would make sense to filter it. Change-Id: I874abec0e8bb8d1ec2894fd6e94bc78b48e384e1 Reviewed-on: https://gerrit.libreoffice.org/3612 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- solenv/gbuild/platform/com_MSC_class.mk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'solenv/gbuild/platform') diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 94db603d6c13..536a44f24144 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -215,6 +215,14 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(DLLTARGET),; if [ ! -f $(DLLTARGET) ]; then rm -f $(1) && false; fi) \ $(if $(filter Library,$(TARGETTYPE)),&& if [ -f $(DLLTARGET).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest $(DLLTARGET).manifest -outputresource:$(DLLTARGET)\;2 && touch -r $(1) $(DLLTARGET).manifest $(DLLTARGET); fi) \ $(if $(filter Executable,$(TARGETTYPE)),&& if [ -f $(1).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest $(1).manifest -outputresource:$(1)\;1 && touch -r $(1) $(1).manifest; fi) \ + $(if $(filter Library,$(TARGETTYPE)),&& \ + echo $(notdir $(DLLTARGET)) > $(1).exports.tmp && \ + $(if $(filter YES,$(LIBRARY_X64)),$(LINK_X64_BINARY),$(gb_LINK)) \ + -dump -exports $(1) >> $(1).exports.tmp && \ + if cmp -s $(1).exports.tmp $(1).exports; \ + then rm $(1).exports.tmp; \ + else mv $(1).exports.tmp $(1).exports; touch -r $(1) $(1).exports; \ + fi) \ ; exit $$RC) endef -- cgit