PGO Build Details/TB-Addrbook

From CDOT Wiki
Jump to: navigation, search

This is the diff I used to enable PGO for the Address Book module.

diff --git a/mailnews/addrbook/src/Makefile.in b/mailnews/addrbook/src/Makefile.in
--- a/mailnews/addrbook/src/Makefile.in
+++ b/mailnews/addrbook/src/Makefile.in
@@ -150,16 +150,27 @@ CPPSRCS		+= \
 		$(NULL)
 
 # XXX These files are not being built as they don't work. Bug 311632 should
 # fix them.
 # nsAbLDAPChangeLogQuery.cpp
 # nsAbLDAPChangeLogData.cpp
 endif
 
+ifdef GNU_CC
+MODULE_OPTIMIZE_FLAGS = -O2
+else
+ifeq ($(OS_ARCH),SunOS)
+MODULE_OPTIMIZE_FLAGS = -xO5
+endif
+ifeq ($(OS_ARCH),WINNT)
+MODULE_OPTIMIZE_FLAGS = -O2
+endif
+endif
+
 ifeq ($(OS_ARCH),Darwin)
 CPPSRCS		+= \
 		nsAbOSXDirFactory.cpp \
 		$(NULL)
 
 CMMSRCS		+= \
 		nsAbOSXCard.mm \
 		nsAbOSXDirectory.mm \