Monday, November 24, 2008

Understanding Thunderbird Build Process

I've been reading the Makefiles for Thunderbird to understand how it compiles. My interest is in the Mozilla core module lcms.

I'm trying to understand if it is possible to disable PGO for that module through the Thunderbird Makefiles instead of modifying the lcms Makefile.

I notice that the flag LCMS_CFLAGS=-DLCMS_DLL is set in the Makefile in the Mozilla core that gets downloaded when using the client.py file. This flag is not set in the Mozilla core when checking out Firefox.

Talking to David Humphrey he mentioned a flag MOZ_ENABLE_LIBXUL. This flag was set in my build output for the Firefox build but not in the Thunderbird build.

In the build output for Thunderbird I noticed that the lcms objs are combined into a mozlcms.dll and in the Firefox build lcms objs are combined into a lib and later it is combined with the xul.dll.

Options for disabling PGO for the LCMS module:
Option1:

A flag could be added in the makefile for the lcms module that will enable or disable PGO. But I would prefer not to modify the Mozilla Core files.

Option2:

After the mozilla core is built, could use another script to build the lcms module again but this time as a lib and re-compile the xul.dll and add the mozlcms.lib into the xul.dll. But this is kind of a hack.

I'll keep looking at it and asking the guys "who know" the best way to proceed.

No comments: