8249821: Separate libharfbuzz from libfontmanager
Reviewed-by: erikj
This commit is contained in:
parent
3e641b796f
commit
b1ff2bd00a
@ -432,10 +432,15 @@ endif
|
||||
|
||||
###########################################################################
|
||||
|
||||
#### Begin harfbuzz configuration
|
||||
|
||||
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN -DHAVE_ROUND
|
||||
|
||||
# This is better than adding EXPORT_ALL_SYMBOLS
|
||||
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
HARFBUZZ_CFLAGS += -DHB_EXTERN=__attribute__\(\(visibility\(\"default\"\)\)\)
|
||||
else ifeq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
HARFBUZZ_CFLAGS += -DHB_EXTERN=__declspec\(dllexport\)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, windows), false)
|
||||
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
|
||||
-DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H \
|
||||
@ -448,18 +453,65 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
HARFBUZZ_CFLAGS += -DHAVE_CORETEXT
|
||||
endif
|
||||
ifeq ($(call isTargetOs, macosx), false)
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
|
||||
LIBHARFBUZZ_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
|
||||
endif
|
||||
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-ft.cc
|
||||
LIBHARFBUZZ_EXCLUDE_FILES += harfbuzz/hb-ft.cc
|
||||
|
||||
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
|
||||
LIBHARFBUZZ_CFLAGS += $(HARFBUZZ_CFLAGS)
|
||||
|
||||
#### End harfbuzz configuration
|
||||
# For use by libfontmanager:
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
LIBHARFBUZZ_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libharfbuzz/harfbuzz.lib
|
||||
else
|
||||
LIBHARFBUZZ_LIBS := -lharfbuzz
|
||||
endif
|
||||
|
||||
LIBHARFBUZZ_EXTRA_HEADER_DIRS := \
|
||||
libharfbuzz/hb-ucdn \
|
||||
#
|
||||
|
||||
LIBHARFBUZZ_OPTIMIZATION := HIGH
|
||||
|
||||
LIBHARFBUZZ_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBHARFBUZZ, \
|
||||
NAME := harfbuzz, \
|
||||
EXCLUDE_FILES := $(LIBHARFBUZZ_EXCLUDE_FILES), \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBHARFBUZZ_CFLAGS), \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBHARFBUZZ_CFLAGS), \
|
||||
OPTIMIZATION := $(LIBHARFBUZZ_OPTIMIZATION), \
|
||||
CFLAGS_windows = -DCC_NOEX, \
|
||||
EXTRA_HEADER_DIRS := $(LIBHARFBUZZ_EXTRA_HEADER_DIRS), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := type-limits missing-field-initializers strict-aliasing, \
|
||||
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
|
||||
maybe-uninitialized class-memaccess, \
|
||||
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
||||
tautological-constant-out-of-range-compare int-to-pointer-cast \
|
||||
undef missing-field-initializers, \
|
||||
DISABLED_WARNINGS_microsoft := 4267 4244 4090 4146 4334 4819 4101 4068 4805 4138, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_aix := -Wl$(COMMA)-berok, \
|
||||
LIBS := $(BUILD_LIBHARFBUZZ), \
|
||||
LIBS_unix := $(LIBM) $(LIBCXX), \
|
||||
LIBS_macosx := -framework CoreText -framework CoreFoundation -framework CoreGraphics, \
|
||||
LIBS_windows := user32.lib, \
|
||||
))
|
||||
|
||||
ifeq ($(FREETYPE_TO_USE), bundled)
|
||||
$(BUILD_LIBHARFBUZZ): $(BUILD_LIBFREETYPE)
|
||||
endif
|
||||
|
||||
TARGETS += $(BUILD_LIBHARFBUZZ)
|
||||
|
||||
###########################################################################
|
||||
|
||||
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
|
||||
libfontmanager/harfbuzz \
|
||||
libfontmanager/harfbuzz/hb-ucdn \
|
||||
libharfbuzz \
|
||||
common/awt \
|
||||
common/font \
|
||||
libawt/java2d \
|
||||
@ -467,8 +519,8 @@ LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
|
||||
libawt/java2d/loops \
|
||||
#
|
||||
|
||||
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS)
|
||||
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
|
||||
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS) $(HARFBUZZ_FLAGS)
|
||||
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBHARFBUZZ_LIBS) $(LIBFREETYPE_LIBS)
|
||||
|
||||
LIBFONTMANAGER_OPTIMIZATION := HIGH
|
||||
|
||||
@ -509,15 +561,9 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
||||
CFLAGS_windows = -DCC_NOEX, \
|
||||
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
|
||||
type-limits missing-field-initializers implicit-fallthrough \
|
||||
strict-aliasing undef unused-function, \
|
||||
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
|
||||
maybe-uninitialized class-memaccess, \
|
||||
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
|
||||
tautological-constant-out-of-range-compare int-to-pointer-cast \
|
||||
sign-compare undef missing-field-initializers, \
|
||||
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101 4068 4805 4138, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare unused-function, \
|
||||
DISABLED_WARNINGS_clang := sign-compare, \
|
||||
DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996, \
|
||||
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
|
||||
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
@ -525,13 +571,12 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
|
||||
LDFLAGS_aix := -Wl$(COMMA)-berok, \
|
||||
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
|
||||
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
|
||||
LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation \
|
||||
-framework CoreGraphics, \
|
||||
LIBS_macosx := -lawt_lwawt, \
|
||||
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
|
||||
$(WIN_AWT_LIB), \
|
||||
))
|
||||
|
||||
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
|
||||
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT) $(BUILD_LIBHARFBUZZ)
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
$(BUILD_LIBFONTMANAGER): $(call FindLib, $(MODULE), awt_lwawt)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user