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
Backport-of: 2c43ecb43fa3c94b69478039f1cd70ed4a577768
  • Loading branch information
TheRealMDoerr committed May 13, 2022
1 parent 7cef5a5 commit 5c1835d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion make/modules/java.desktop/lib/Awt2dLibraries.gmk
Expand Up @@ -470,7 +470,6 @@ else

endif


LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
libharfbuzz \
common/awt \
Expand All @@ -485,6 +484,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 ($(call isTargetOs, windows), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c
Expand Down

1 comment on commit 5c1835d

@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.