Closed Bug 327848 Opened 18 years ago Closed 18 years ago

Drive the Mac universal build process entirely in-tree

Categories

(Firefox Build System :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

References

Details

(Keywords: fixed1.8.0.2, fixed1.8.1, Whiteboard: [nvn-dl])

Attachments

(2 files, 1 obsolete file)

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.
Flags: blocking1.8.0.2?
Attached patch Universal Taskmaster, v1 (obsolete) — Splinter Review
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)
Attached file 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.
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 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.
Attachment #212437 - Flags: review?(benjamin) → review+
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+
Checked in on 1_8, 1_8_0.  Adjustments made for branch versions of packager.mk as needed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
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.
Whiteboard: [nvn-dl]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: