summaryrefslogtreecommitdiff
path: root/solenv/gbuild/platform
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-04-17 12:40:20 +0200
committerTor Lillqvist <tml@iki.fi>2013-04-26 07:54:39 +0000
commit170668d83911c12475eccf69eba5e191863d4a56 (patch)
tree4543f5df8dbc5463fca6388e9f71081fc4ff8a79 /solenv/gbuild/platform
parent15f8a130e2e1a3c920b02ad034d09e547e69ea57 (diff)
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 <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'solenv/gbuild/platform')
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk8
1 files changed, 8 insertions, 0 deletions
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