Closed Bug 674564 Opened 9 years ago Closed 9 years ago

Cannot build NSS in mozilla-central with clang

Categories

(Core :: Security: PSM, defect, P1)

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 673382

People

(Reporter: briansmith, Assigned: briansmith)

References

Details

+++ This bug was initially created as a clone of Bug #671711 +++

There is a patch in bug 671711 that fixes this, that has already been checked into the NSS trunk and the NSS 3.12 branch.

Ehsan wrote:
> This is a patch that we want to have on m-c as soon as possible to
> prevent build bustages.  If we can't do an NSS merge soon, we need
> to take this as a spot fix on m-c once it gets reviewed...

Rafael Ávila de Espíndola wrote:
> Brian, what is the schedule for the 3.12.11 release?
> This bug currently blocks building with clang. I have hacked the
> version of clang we have on the bots, but having to hack the
> compiler instead of fixing our own code is not the ideal situation.

Our plan was to do a 3.12.11 very soon. I will make sure that at a minimum that the release fixes this and the Linux 3.0 build issue. If we make the NSS 3.12.11 release just fix this bug and the Linux 3.0 build issue, then that release can happen tomorrow or Friday. If we need the fix before then, or if the NSS 3.12.11 release gets delayed for any reason, then let's add this patch as a one-off fix to mozilla-central. I will attach the backport patch to mozilla-central to this bug.

I would like to learn more about what exactly we are using clang for. Are we distributing clang-built binaries to end-users now? Or, will we be soon? The reason I ask is that, AFAICT, building NSS with clang is not supported and we might need to do additional work--including, at least, setting up a buildbot that runs the NSS testsuite on clang-built NSS. (Note that the NSS testsuite is not part of the Gecko testsuite and does not run when the rest of our tests do.)
I created an NSS_3_12_11_BETA1 CVS tag this morning and
pushed it to mozilla-central.  You can mark this bug as
a duplicate of the NSS 3.12.11 upgrade bug (bug 673382).
Thank you Wan-Teh.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 673382
> I would like to learn more about what exactly we are using clang for. Are we
> distributing clang-built binaries to end-users now? Or, will we be soon? The
> reason I ask is that, AFAICT, building NSS with clang is not supported and
> we might need to do additional work--including, at least, setting up a
> buildbot that runs the NSS testsuite on clang-built NSS. (Note that the NSS
> testsuite is not part of the Gecko testsuite and does not run when the rest
> of our tests do.)

The only current use case is as a developer tool for being faster and having better diagnostics. It looks like the first production use will be the new dxr with uses clang.

We do have a bug (672210) for setting up bots with clang. Would be great to run the nss tests in there too.

Last but not least, we will have to move to clang on OS X at some point. Xcode 4.2 doesn't include gcc anymore and new features are clang only even on 4.11 (__thread, c++0x, ARC)
You need to log in before you can comment on or make changes to this bug.