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

Commit f7d5c59

Browse files
author
Yuri Nesterenko
committed
8283323: libharfbuzz optimization level results in extreme build times
Backport-of: 2c43ecb43fa3c94b69478039f1cd70ed4a577768
1 parent 78648cb commit f7d5c59

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

make/modules/java.desktop/lib/Awt2dLibraries.gmk

+8-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ else
468468

469469
endif
470470

471-
472471
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
473472
libharfbuzz \
474473
libharfbuzz/hb-ucdn \
@@ -485,6 +484,14 @@ BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
485484

486485
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
487486

487+
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
488+
# gcc (and to an extent clang) is particularly bad at optimizing these files,
489+
# causing a massive spike in compile time. We don't care about these
490+
# particular files anyway, so lower optimization level.
491+
BUILD_LIBFONTMANAGER_hb-subset.cc_OPTIMIZATION := SIZE
492+
BUILD_LIBFONTMANAGER_hb-subset-plan.cc_OPTIMIZATION := SIZE
493+
endif
494+
488495
ifeq ($(call isTargetOs, windows), true)
489496
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
490497
X11TextRenderer.c

0 commit comments

Comments
 (0)