Last Comment Bug 327848 - Drive the Mac universal build process entirely in-tree
: Drive the Mac universal build process entirely in-tree
Status: RESOLVED FIXED
[nvn-dl]
: fixed1.8.0.2, fixed1.8.1
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: PowerPC Mac OS X
: -- normal (vote)
: ---
Assigned To: Mark Mentovai
:
Mentors:
Depends on: 307311 322578 324855 325410 327823
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-19 13:02 PST by Mark Mentovai
Modified: 2006-03-01 13:47 PST (History)
10 users (show)
dveditz: blocking1.8.0.2+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Universal Taskmaster, v1 (16.30 KB, patch)
2006-02-19 20:07 PST, Mark Mentovai
benjamin: review+
Details | Diff | Splinter Review
Sample mozconfig (351 bytes, text/plain)
2006-02-19 20:11 PST, Mark Mentovai
no flags Details
Universal Taskmaster, v2 (as checked in) (16.16 KB, patch)
2006-02-21 13:04 PST, Mark Mentovai
benjamin: approval‑branch‑1.8.1+
dveditz: approval1.8.0.2+
Details | Diff | Splinter Review

Description Mark Mentovai 2006-02-19 13:02:42 PST
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.
Comment 1 Mark Mentovai 2006-02-19 13:05:26 PST
Required for Mac universal binaries.
Comment 2 Mark Mentovai 2006-02-19 20:07:23 PST
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.
Comment 3 Mark Mentovai 2006-02-19 20:11:52 PST
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 4 Benjamin Smedberg [:bsmedberg] 2006-02-21 09:43:41 PST
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 5 Benjamin Smedberg [:bsmedberg] 2006-02-21 11:09:49 PST
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.
Comment 6 Mark Mentovai 2006-02-21 13:04:43 PST
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 7 Daniel Veditz [:dveditz] 2006-02-21 17:56:44 PST
Comment on attachment 212632 [details] [diff] [review]
Universal Taskmaster, v2 (as checked in)

approved for 1.8.0 branch, a=dveditz
Comment 8 Mark Mentovai 2006-02-22 09:34:12 PST
Checked in on 1_8, 1_8_0.  Adjustments made for branch versions of packager.mk as needed.
Comment 9 Dave Liebreich [:davel] 2006-03-01 13:47:37 PST
marking [nvn-dl], which removes this bug from the "to be verified by QA" list for Firefox 1.5.0.2.  QA will discover if universal binaries fail to build correctly through the normal testing process.

Note You need to log in before you can comment on or make changes to this bug.