Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8283323: libharfbuzz optimization level results in extreme build times
Reviewed-by: mdoerr
Backport-of: 2c43ecb43fa3c94b69478039f1cd70ed4a577768
  • Loading branch information
Tyler Steele authored and TheRealMDoerr committed May 13, 2022
1 parent 844f03b commit 9cb3797
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion make/lib/Awt2dLibraries.gmk
Expand Up @@ -577,7 +577,6 @@ else

endif


LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
libharfbuzz \
libharfbuzz/hb-ucdn \
Expand All @@ -593,6 +592,14 @@ BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)

LIBFONTMANAGER_OPTIMIZATION := HIGHEST

ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
# gcc (and to an extent clang) is particularly bad at optimizing these files,
# causing a massive spike in compile time. We don't care about these
# particular files anyway, so lower optimization level.
BUILD_LIBFONTMANAGER_hb-subset.cc_OPTIMIZATION := SIZE
BUILD_LIBFONTMANAGER_hb-subset-plan.cc_OPTIMIZATION := SIZE
endif

ifeq ($(OPENJDK_TARGET_OS), windows)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c
Expand Down

1 comment on commit 9cb3797

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.