tdf#128133 WIN don't exit after link-output filter

The linker output filter command (gb_filter_link_output) ends with
an exit "${PIPESTATUS[0]}", which will quit the current Makefile
shell command always after calling the linker. This prevents the
later shell code of that line to run, which includes the merge of
the DeclareDPIAware.manifest. That manifest would tell Windows
that LO binaries are "<dpiAware>true</dpiAware>", to prevent
System DPI scaling. Since it's not merged, LO is scaled by the OS,
resulting in blurry fonts.

Since there is no reason to have an extra make "function", like
ifeq or multiple definitions, this includes the code directly.

Additionally the MS linker has localized output, so this patch
uses a more generic regexp to filter-out the default link message,
which works with the English and German locale.

Change-Id: I0099f6c38ca0eda18c7b0c108529bc73189c1504
Reviewed-on: https://gerrit.libreoffice.org/84099
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
Jan-Marek Glogowski 2019-11-30 01:56:46 +01:00 committed by Jan-Marek Glogowski
parent 0fa95852b0
commit d10db78466
3 changed files with 3 additions and 7 deletions

View file

@ -232,7 +232,7 @@ $(call gb_Helper_abbreviate_dirs,\
-manifestfile:$(WORKDIR)/LinkTarget/$(2).manifest \
-pdb:$(call gb_LinkTarget__get_pdb_filename,$(WORKDIR)/LinkTarget/$(2))) \
$(if $(ILIBTARGET),-out:$(1) -implib:$(ILIBTARGET),-out:$(1)) \
$(call gb_filter_link_output); RC=$$?; rm $${RESPONSEFILE} \
| LC_ALL=C $(GBUILDDIR)/platform/filter-creatingLibrary.awk; RC=$${PIPESTATUS[0]}; rm $${RESPONSEFILE} \
$(if $(filter Library,$(TARGETTYPE)),; if [ ! -f $(ILIBTARGET) ]; then rm -f $(1); exit 42; fi) \
$(if $(filter Library,$(TARGETTYPE)),&& if [ -f $(WORKDIR)/LinkTarget/$(2).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest $(WORKDIR)/LinkTarget/$(2).manifest $(SRCDIR)/solenv/gbuild/platform/win_compatibility.manifest -outputresource:$(1)\;2 && touch -r $(1) $(WORKDIR)/LinkTarget/$(2).manifest $(ILIBTARGET); fi) \
$(if $(filter Executable,$(TARGETTYPE)),&& if [ -f $(WORKDIR)/LinkTarget/$(2).manifest ]; then mt.exe $(MTFLAGS) -nologo -manifest $(WORKDIR)/LinkTarget/$(2).manifest $(SRCDIR)/solenv/gbuild/platform/win_compatibility.manifest -outputresource:$(1)\;1 && touch -r $(1) $(WORKDIR)/LinkTarget/$(2).manifest; fi) \

View file

@ -279,10 +279,6 @@ define gb_create_deps
endef
endif
define gb_filter_link_output
| LC_ALL=C $(GBUILDDIR)/platform/filter-creatingLibrary.awk; exit $${PIPESTATUS[0]}
endef
gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
# When compiling for CLR, disable "warning C4339: use of undefined type detected

View file

@ -14,13 +14,13 @@
BEGIN {
creatinglibrary_prefix = ENVIRON["CREATINGLIBRARY_PREFIX"];
if (!creatinglibrary_prefix) {
creatinglibrary_prefix = " Creating library "
creatinglibrary_prefix = "\\.lib.*\\.exp"
}
firstline = 1
}
{
if (firstline && index($0, creatinglibrary_prefix) == 1) {
if (firstline && match($0, creatinglibrary_prefix)) {
# ignore
} else {
# because MSVC stupidly prints errors on stdout, it's