Closed Bug 1530671 Opened 2 years ago Closed 1 year ago

Enable the NSS gyp build to distinguish a Mozilla build from a Comm build

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: KaiE, Assigned: KaiE)

References

Details

Attachments

(1 file, 7 obsolete files)

When building Mozilla, inside the build scripts, I must be able to detect, whether it's being built for Firefox, or for one of the Comm applications (Thunderbird/Suite).

The reason is bug 1529308 and bug 1529227.

Because cmsutil needs more symbols than Firefox wants to export, I'd like to build cmsutil only when NSS is built as part of a Thunderbird/Suite build, but not if it's build inside Firefox.

In theory I could look at the string names for MOZ_APP_BASENAME, and compare with the Thunderbird and Suite names, but that seems less ideal, should anyone produce a derived build with a different name, or if we ever change brand names.

It might be better to introduce a new variable for that.

How about adding MOZ_COMM=1 ?

Attached patch 1530671-v1.patch - Mozilla part (obsolete) — Splinter Review
Attachment #9046687 - Attachment is obsolete: true

Rob, does this approach make sense?

Flags: needinfo?(rob)
Attached patch comm-1530671-v3.patch (obsolete) — Splinter Review
Attachment #9046691 - Attachment is obsolete: true
Attachment #9046685 - Flags: review?(rob)
Attachment #9046693 - Flags: review?(rob)

How about using MOZ_BUILD_APP?

For Thunderbird it will be set to "comm/mail", and Seamonkey it's "comm/suite".

The other way I've seen it done in the build code is by checking for "$commtopsrcdir"..

Flags: needinfo?(rob)

Thanks a lot, using commtopsrcdir works for me.

Attachment #9046693 - Attachment is obsolete: true
Attachment #9046693 - Flags: review?(rob)
Attached patch 1530671-v2.patch (obsolete) — Splinter Review

This translates the CONFIG flag into a gyp variable, which is used by bug 1529308.

Attachment #9046685 - Attachment is obsolete: true
Attachment #9046685 - Flags: review?(rob)
Comment on attachment 9046778 [details] [diff] [review]
1530671-v2.patch

Ted, CONFIG['commtopsrcdir'] is only defined when we do a thunderbird of seamonkey build.

If set, it sets a gyp variable, so we can use it in the NSS build for bug 1529308.
Attachment #9046778 - Flags: review?(ted)

If we can use MOZ_BUILD_APP I think that would be preferable.
Sooner rather than later I'd like to make progress with having comm-central essentially a branch off mozilla-central, and then commtopsrcdir would probably not be a thing anymore.

Comment on attachment 9046778 [details] [diff] [review]
1530671-v2.patch

Ok, let me make a new patch that uses MOZ_BUILD_APP
Attachment #9046778 - Attachment is obsolete: true
Attachment #9046778 - Flags: review?(ted)
Attached patch 1530671-v3.patch (obsolete) — Splinter Review
Attachment #9046820 - Flags: review?(ted)
Summary: Distinguish a Mozilla build from a Comm build → Allow the NSS gyp build to distinguish a Mozilla build from a Comm build
Summary: Allow the NSS gyp build to distinguish a Mozilla build from a Comm build → Enable the NSS gyp build to distinguish a Mozilla build from a Comm build
Attached patch 1530671-v4.patch (obsolete) — Splinter Review

patch v4 uses a simpler and more generic syntax

(found at https://searchfox.org/comm-central/source/mailnews/moz.build#86 )

Attachment #9046820 - Attachment is obsolete: true
Attachment #9046820 - Flags: review?(ted)
Attachment #9047321 - Flags: review?(ted)
Attachment #9047321 - Attachment is obsolete: true
Attachment #9047321 - Flags: review?(ted)
Pushed by kaie@kuix.de:
https://hg.mozilla.org/integration/autoland/rev/082a7bbf945a
Title: Enable the NSS gyp build to distinguish a Mozilla build from a Comm build r=glandium
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.