Drive the Mac universal build process entirely in-tree




Build Config
12 years ago
12 years ago


(Reporter: Mark Mentovai, Assigned: Mark Mentovai)


({fixed1.8.0.2, fixed1.8.1})

Mac OS X
fixed1.8.0.2, fixed1.8.1
Dependency tree / graph
Bug Flags:
blocking1.8.0.2 +

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [nvn-dl])


(2 attachments, 1 obsolete attachment)



12 years ago
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
Bug 327823 updates 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

12 years ago
Required for Mac universal binaries.
Flags: blocking1.8.0.2?

Comment 2

12 years ago
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.
Attachment #212437 - Flags: review?(benjamin)

Comment 3

12 years ago
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.


12 years ago
Depends on: 325410
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 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) 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) 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.
Attachment #212437 - Flags: review?(benjamin) → review+

Comment 6

12 years ago
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.
Attachment #212437 - Attachment is obsolete: true
Attachment #212632 - Flags: approval1.8.0.2?
Attachment #212632 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #212632 - Flags: approval-branch-1.8.1?(benjamin) → approval-branch-1.8.1+
Flags: blocking1.8.0.2? → blocking1.8.0.2+
Comment on attachment 212632 [details] [diff] [review]
Universal Taskmaster, v2 (as checked in)

approved for 1.8.0 branch, a=dveditz
Attachment #212632 - Flags: approval1.8.0.2? → approval1.8.0.2+

Comment 8

12 years ago
Checked in on 1_8, 1_8_0.  Adjustments made for branch versions of as needed.
Keywords: fixed1.8.0.2, fixed1.8.1


12 years ago
Last Resolved: 12 years ago
Resolution: --- → FIXED
marking [nvn-dl], which removes this bug from the "to be verified by QA" list for Firefox  QA will discover if universal binaries fail to build correctly through the normal testing process.
Whiteboard: [nvn-dl]
You need to log in before you can comment on or make changes to this bug.