This article is in need of a technical review.
This page has detailed information on how to build NSS. Because NSS is a cross-platform library that builds on many different platforms and has many options, it may be complex to build. Please read these instructions carefully before attempting to build.
- Get the Prerequisites
- NSS compilation on Windows uses the same shared build system as Mozilla Firefox. You must first install the Windows Prerequisites, including MozillaBuild.
Get the source
NSS and NSPR currently use CVS for source control, rather than Mercurial like other Mozilla projects. In order to get the source, you will need to perform a CVS checkout. To check out the latest sources for NSS and NSPR--which may not be part of a stable release--use the following commands:
cvs -d :pserver:email@example.com:/cvsroot co -r HEAD NSPR cvs -d :pserver:firstname.lastname@example.org:/cvsroot co -r HEAD NSS
Configure the Environment
The build system for NSS uses a variety of environment variables to control the build. Below is a list of the variables, along with possible values they may be set to. For example, on Windows, you may wish to set OS_TARGET=WINNT.
- Build for all supported versions of Windows. This is the default (as of NSS 3.15.4) and recommend configuration.
- Build in an alternative way that makes use of special features like the Windows fibers API.
- Build a debug (non-optimized) version of NSS. This is the default.
- Build an optimized (non-debug) version of NSS.
Note: Building for a 64-bit environment/ABI is only supported on Unix/POSIX platforms.
- Build for a 32-bit environment/ABI. This is the default.
- Build for a 64-bit environment/ABI.
To build NSS, it's as simple as navigating to the NSS checkout and making the "nss_build_all" target.
cd mozilla/security/nss make nss_build_all