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

RESOLVED FIXED in Firefox 67

Status

enhancement
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: kaie, Assigned: kaie)

Tracking

unspecified
mozilla67

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment, 7 obsolete attachments)

(Assignee)

Description

3 months ago

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 ?

(Assignee)

Comment 1

3 months ago
(Assignee)

Comment 2

3 months ago
(Assignee)

Comment 3

3 months ago
Attachment #9046687 - Attachment is obsolete: true
(Assignee)

Comment 4

3 months ago

Rob, does this approach make sense?

Flags: needinfo?(rob)
(Assignee)

Comment 5

3 months ago
Posted patch comm-1530671-v3.patch (obsolete) — Splinter Review
Attachment #9046691 - Attachment is obsolete: true
(Assignee)

Updated

3 months ago
Attachment #9046685 - Flags: review?(rob)
(Assignee)

Updated

3 months ago
Attachment #9046693 - Flags: review?(rob)

Comment 6

3 months ago

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)
(Assignee)

Comment 7

3 months ago

Thanks a lot, using commtopsrcdir works for me.

(Assignee)

Updated

3 months ago
Attachment #9046693 - Attachment is obsolete: true
Attachment #9046693 - Flags: review?(rob)
(Assignee)

Comment 8

3 months ago
Posted 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)
(Assignee)

Comment 9

3 months ago
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.

(Assignee)

Comment 11

3 months ago
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)
(Assignee)

Comment 12

3 months ago
Posted patch 1530671-v3.patch (obsolete) — Splinter Review
Attachment #9046820 - Flags: review?(ted)
(Assignee)

Updated

3 months ago
Summary: Distinguish a Mozilla build from a Comm build → Allow the NSS gyp build to distinguish a Mozilla build from a Comm build
(Assignee)

Updated

3 months ago
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
(Assignee)

Comment 13

3 months ago
Posted 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)
(Assignee)

Updated

3 months ago
Attachment #9047321 - Attachment is obsolete: true
Attachment #9047321 - Flags: review?(ted)

Comment 15

2 months ago
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

Comment 16

2 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.