Bug 322578 gives the ability to cross-compile on the Mac. Bug 324855 allows single-CPU builds to be merged, producing a universal binary. Bug 307311 lets you build multiple times from a single "make" in client.mk. Bug 327823 updates client.mk to allow pre/postprocessing actions. In this bug, I'll introduce an in-tree mozconfig that builds the same project twice, once natively and once as a cross build. I'll also introduce a postprocessing action to take the results of those two builds and merge them into a universal binary. We've already done this for Camino 1.0, the patch here will be a slightly-updated version of what was used there.
Required for Mac universal binaries.
Created attachment 212437 [details] [diff] [review] Universal Taskmaster, v1 This has been tested with Camino, Firefox, Thunderbird, and SeaMonkey. Thunderbird and SeaMonkey also depend on fixing up the LDAP C-SDK in bug 327864. XULRunner may need to do something different because it packages a .pkg, so it must be made universal prior to calling PackageMaker.
Created attachment 212440 [details] Sample mozconfig This shows how to build Firefox/DeerPark as a universal binary, provided this patch and all those it depends on have been applied.
Comment on attachment 212437 [details] [diff] [review] Universal Taskmaster, v1 I've got several questions, which may need input from others: 1) How does this interact with talkback symbol pickup? Do we even have talkback for x86, and have we tested it at all with fat binaries? 2) Does flight.mk assume that MOZ_BUILD_PROJECTS="ppc i386"? I'd like to avoid that assumption, since it breaks the intended purpose of MOZ_BUILD_PROJECTS which is to build multiple applications. How about something that processes this: mk_add_options MOZ_BUILD_PROJECTS="xulrunner-ppc xulrunner-i386 browser-ppc browser-i386 macbrowser-ppc macbrowser-i386" ac_add_options export MOZ_BUILD_UNIVERSAL="xulrunner browser macbrowser" mk_add_options export OBJDIR_PPC=$(MOZ_OBJDIR)/ppc 3) flight.mk has MOZ_BUILD_APP ifdefs, but I'm having trouble understand what they're for or why MOZ_BUILD_APP would be set in the *_all: rules. 4) flight.mk has what appear to be blank lines in the middle of rules. That is guaranteed to confuse GNU make.
Comment on attachment 212437 [details] [diff] [review] Universal Taskmaster, v1 Please remove the blank lines, which will definitely break gmake 3.79, and this is ok as a hack... still want to identify a better way to handle unification of multiple apps and making this less fragile.
Created attachment 212632 [details] [diff] [review] Universal Taskmaster, v2 (as checked in) This version of the patch was checked in, addressing the review comments and changing MOZ_BUILD_DATE_DIR to MOZ_UNIFY_BDATE to match bug 328081.
Comment on attachment 212632 [details] [diff] [review] Universal Taskmaster, v2 (as checked in) approved for 1.8.0 branch, a=dveditz
Checked in on 1_8, 1_8_0. Adjustments made for branch versions of packager.mk as needed.
marking [nvn-dl], which removes this bug from the "to be verified by QA" list for Firefox 126.96.36.199. QA will discover if universal binaries fail to build correctly through the normal testing process.