Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
/ jdk13u-dev Public archive

Commit 3493d0e

Browse files
author
Yuri Nesterenko
committed
8283323: libharfbuzz optimization level results in extreme build times
Reviewed-by: dcherepanov Backport-of: 2c43ecb43fa3c94b69478039f1cd70ed4a577768
1 parent c9232df commit 3493d0e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

make/lib/Awt2dLibraries.gmk

+8-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,6 @@ else
587587

588588
endif
589589

590-
591590
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
592591
libharfbuzz \
593592
libharfbuzz/hb-ucdn \
@@ -604,6 +603,14 @@ BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
604603

605604
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
606605

606+
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
607+
# gcc (and to an extent clang) is particularly bad at optimizing these files,
608+
# causing a massive spike in compile time. We don't care about these
609+
# particular files anyway, so lower optimization level.
610+
BUILD_LIBFONTMANAGER_hb-subset.cc_OPTIMIZATION := SIZE
611+
BUILD_LIBFONTMANAGER_hb-subset-plan.cc_OPTIMIZATION := SIZE
612+
endif
613+
607614
ifeq ($(call isTargetOs, windows), true)
608615
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
609616
X11TextRenderer.c

0 commit comments

Comments
 (0)