From 90f1e2719a98a4ed0c02db75ac6e223f98688d8f Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Tue, 1 May 2012 20:00:35 +0100 Subject: [PATCH] bug 750728 - move graphite from libxul to libgkmedias on windows, to help with PGO problems. r=khuey a=ehsan to land on a CLOSED TREE --- configure.in | 2 +- gfx/graphite2/src/Makefile.in | 16 +++++++++++++--- layout/media/Makefile.in | 4 ++++ toolkit/library/Makefile.in | 4 ---- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 21e0f9ea2ba..04424af366c 100644 --- a/configure.in +++ b/configure.in @@ -4610,7 +4610,7 @@ BUILD_CTYPES=1 MOZ_USE_NATIVE_POPUP_WINDOWS= MOZ_ANDROID_HISTORY= MOZ_WEBSMS_BACKEND= -MOZ_GRAPHITE= +MOZ_GRAPHITE=1 ACCESSIBILITY=1 case "$target_os" in diff --git a/gfx/graphite2/src/Makefile.in b/gfx/graphite2/src/Makefile.in index bb6b12ec908..fba914e5e18 100644 --- a/gfx/graphite2/src/Makefile.in +++ b/gfx/graphite2/src/Makefile.in @@ -56,7 +56,13 @@ include $(srcdir)/files.mk MODULE = graphite2 LIBRARY_NAME = mozgraphite2 + +# on Windows, we're going to link graphite with gkmedias instead of libxul +ifeq (WINNT,$(OS_TARGET)) +VISIBILITY_FLAGS = +else LIBXUL_LIBRARY = 1 +endif # MSVC doesn't like the paths in _SOURCES, so strip off the prefix # and leave bare filenames @@ -68,6 +74,13 @@ EXPORTS_graphite2 = $(_PUBLIC_HEADERS) FORCE_STATIC_LIB = 1 FORCE_USE_PIC = 1 +ifeq (WINNT,$(OS_TARGET)) +DEFINES += -DGRAPHITE2_EXPORTING +else +# tell graphite2 not to export symbols, we'll be linking it directly with thebes +DEFINES += -DGRAPHITE2_STATIC +endif + include $(topsrcdir)/config/rules.mk DEFINES += -DPACKAGE_VERSION="\"moz\"" @@ -76,9 +89,6 @@ DEFINES += -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\"" # disable features we don't need in the graphite2 code, to reduce code size DEFINES += -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE -# tell graphite2 not to export symbols, we'll be linking it directly with thebes -DEFINES += -DGRAPHITE2_STATIC - # provide a custom header that overrides malloc() and friends, # to ensure safe OOM handling DEFINES += -DGRAPHITE2_CUSTOM_HEADER="\"MozGrMalloc.h\"" diff --git a/layout/media/Makefile.in b/layout/media/Makefile.in index 1e5d3fed59d..190b6b2c4ac 100644 --- a/layout/media/Makefile.in +++ b/layout/media/Makefile.in @@ -51,6 +51,10 @@ endif SHARED_LIBRARY_LIBS = $(MOZ_OTS_LIBS) +ifdef MOZ_GRAPHITE +SHARED_LIBRARY_LIBS += $(MOZ_GRAPHITE_LIBS) +endif + ifdef MOZ_VORBIS SHARED_LIBRARY_LIBS += \ $(DEPTH)/media/libvorbis/lib/$(LIB_PREFIX)vorbis.$(LIB_SUFFIX) \ diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 89b0b7dbd2d..a627e1fde09 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -344,10 +344,6 @@ EXTRA_DSO_LDOPTS += \ $(SQLITE_LIBS) \ $(NULL) -ifdef MOZ_GRAPHITE -EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE_LIBS) -endif - ifdef MOZ_NATIVE_ZLIB EXTRA_DSO_LDOPTS += $(ZLIB_LIBS) else