Closed Bug 483577 Opened 11 years ago Closed 11 years ago

Find a way to make compiling mailnews with or without external api easier and set it up

Categories

(MailNews Core :: Build Config, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

The ongoing effort to make mailnews compile with external linkage has been slowly progressing for a while now. We're at the stage where mailnews/base/util, mailnews/addrbook, mailnews/mime all are very close to being able to be built with external linkage.

To aid those trying to get this working (and maintain the current state), we should make it easier to set up builds for it. In practice this means:

1) Making MOZILLA_INTERNAL_API (defined in Makefile.in files) be optional.
2) Setting up the link libraries to reference the appropriate external linkage libraries, rather than the internal ones.

Current thoughts are:

a) configure flag
b) environment variable set in .mozconfig

We could do an optional based on --enable-libxul, but I'm tempted to say we should have something like --enable-experimental-comm-central-external-linkage or something a bit shorter ;-)

Thoughts?
I think a configure flag would be perfect for this. Just --enable-external-linkage maybe?
Not had any comments, so this is what I propose: an --enable-incomplete-external-linkage option.

This will allow us to "toggle" various items for the frozen API. The mailnews/addrbook Makefile.in are examples of its use.

If this patch is accepted, I'll look at rolling the changes out across mailnews some of which I already have in existing patches.
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attachment #368243 - Flags: review?(kairo)
Comment on attachment 368243 [details] [diff] [review]
Proposed Solution

Thanks for this, sounds like a good way for the transition to external linkage and libxul!
Attachment #368243 - Flags: review?(kairo) → review+
I haven't pushed the first patch yet. However this is the natural extension to it - spread MOZ_INCOMPLETE_EXTERNAL_LINKAGE throughout mailnews and provide the correct lib setups where necessary.

There's a couple of bits of tidy up as well, e.g. don't link against MOZ_JS_LIBS because we don't need to, and remove a couple of EXTRA_DSO_LDOPTS definitions because they are in directories where we don't link objects.

Hopefully I've got the external linkage cases correctly, its a bit hard to test those at the moment.
Attachment #368902 - Flags: review?(kairo)
Comment on attachment 368902 [details] [diff] [review]
Part 2 - Spread new build option to rest of mailnews makefiles.

Haven't tried compiling with that flag, but as long as things are still OK with default builds, this should be a good way to work on getting external linkage to work someday.
Attachment #368902 - Flags: review?(kairo) → review+
I checked both of these patches in under the same changeset: http://hg.mozilla.org/comm-central/rev/e1cff334fba5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.