Skip to content

Commit 9cb3797

Browse files
Tyler SteeleTheRealMDoerr
Tyler Steele
authored andcommitted
8283323: libharfbuzz optimization level results in extreme build times
Reviewed-by: mdoerr Backport-of: 2c43ecb43fa3c94b69478039f1cd70ed4a577768
1 parent 844f03b commit 9cb3797

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
@@ -577,7 +577,6 @@ else
577577

578578
endif
579579

580-
581580
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
582581
libharfbuzz \
583582
libharfbuzz/hb-ucdn \
@@ -593,6 +592,14 @@ BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
593592

594593
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
595594

595+
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
596+
# gcc (and to an extent clang) is particularly bad at optimizing these files,
597+
# causing a massive spike in compile time. We don't care about these
598+
# particular files anyway, so lower optimization level.
599+
BUILD_LIBFONTMANAGER_hb-subset.cc_OPTIMIZATION := SIZE
600+
BUILD_LIBFONTMANAGER_hb-subset-plan.cc_OPTIMIZATION := SIZE
601+
endif
602+
596603
ifeq ($(OPENJDK_TARGET_OS), windows)
597604
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
598605
X11TextRenderer.c

0 commit comments

Comments
 (0)