Closed Bug 844880 Opened 12 years ago Closed 6 years ago

Allow to build the main NSS libraries as static libraries

Categories

(NSS :: Build, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Unassigned)

Details

Currently, the static libraries built under security/nss are subparts of nss3, smime3, ssl3 and nssutil3. It would be useful to be able to build nss3, smime3, ssl3 and nssutil3 as "complete" static libraries.
Is this a dupe of bug #534471 ? If not, how is it distinct?
(In reply to Ryan Sleevi from comment #1) > Is this a dupe of bug #534471 ? If not, how is it distinct? It's a subset of bug 534471.

Adding Edouard and Ryan and tweaking priority.

On some platforms like iOS, loading a dynamic library incurs a performance overhead. It also drives the binary size up. Static linking might help this a little, even if the PKCS#11 interface will force certain symbols to be present even when they aren't used.

Static linking to the "top level" libraries as described here is likely what we'll want to use. We can explore whether or not to statically link freebl and softoken as well, though that might be best done in stages. There are some changes with --test/test_build that might be used to help here.

This would not be the default build configuration, but it should be enabled through a build flag.

Priority: -- → P2

Note that Firefox already folds nss, smime, ssl and nssutil into one library.

Note that Firefox already folds nss, smime, ssl and nssutil into one library.

Is this something we can easily replicate when building NSS standalone?

I believe the flag MOZ_FOLD_LIBS can be used, however in the dylib case since there's no stripping you'll be shipping ssl/sqlite as well.

These are the knobs Firefox sets:
https://searchfox.org/mozilla-central/rev/69ace9da347adcc4a33c6fa3d8e074759b91068c/security/moz.build#42-50

... I guess this means this bug, as filed, is already fixed to some extent.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

I believe there is a misunderstanding here, we still want to statically link against libnss.
Comment 6 Comment 7 are good intermediate states for iOS to ship less dylibs, but ultimately we'd rather statically link.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Well, the bug I filed 6 years ago is fixed. I don't know what you want more, but that's not what I filed this bug for.

Blocks: 1543545
Regressions: 1543545
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
No longer blocks: 1543545
No longer regressions: 1543545
You need to log in before you can comment on or make changes to this bug.