1 Usage: build.sh [-h] [-c|-cc] [-v] [-j <n>] [--gyp|-g] [--opt|-o]
2 [-t <x64|ia32|...>|--target=<x64|ia32|...>]
3 [--clang|--gcc|--msvc] [--scan-build[=dir]] [--disable-tests]
4 [--pprof] [--asan] [--msan] [--ubsan[=bool,shift,...]
5 [--fuzz[=tls|oss]] [--sancov[=edge|bb|func|...]]
6 [--emit-llvm] [--no-zdefs] [--static] [--ct-verif]
7 [--nspr|--with-nspr=<include>:<lib>|--system-nspr]
8 [--system-sqlite] [--enable-fips] [--enable-libpkix]
9 [--mozpkix-only] [-D<gyp-option>]
10 [--rebuild] [--enable-legacy-db]
12 This script builds NSS with gyp and ninja.
14 NSS build tool options:
16 -h display this help and exit
18 -cc clean without building
20 -j <n> run at most <n> concurrent jobs
21 --gyp|-g force a rerun of gyp
22 --opt|-o do an opt build
23 --target|-t specify target architecture (e.g., ia32, x64, aarch64)
24 --clang build with clang and clang++
25 --gcc build with gcc and g++
26 --msvc build with MSVC
27 --scan-build run the build with scan-build
28 --scan-build=<dir> sets the output path for scan-build
29 --disable-tests don't build tests and corresponding cmdline utils
30 --pprof build with gperftool support
31 --asan enable address sanitizer
32 --msan enable memory sanitizer
33 --ubsan enable undefined behavior sanitizer
34 --ubsan=bool,shift,... sets specific UB sanitizers
35 --fuzz build fuzzing targets (this always enables static builds)
36 --fuzz=tls to enable TLS fuzzing mode
37 --fuzz=oss to build for OSS-Fuzz
38 --sancov do sanitize coverage builds
39 --sancov=func sets coverage to function level for example
40 --emit-llvm emit LLVM bitcode while building
41 (requires the gold linker, use clang-3.8 for SAW)
42 --no-zdefs don't set -Wl,-z,defs
43 --static create static libraries and use static linking
44 --ct-verif build with valgrind for ct-verif
45 --nspr force a rebuild of NSPR
46 --nspr-test-build when building NSPR also build its tests
47 --nspr-test-run when building NSPR tests also run its tests
48 --nspr-only exit after building NSPR
49 --with-nspr use the NSPR build at the given locations
50 --with-nspr=<include>:<lib> sets include and lib paths
51 --system-nspr attempt to use system nspr
52 shorthand for --with-nspr=/usr/include/nspr:
53 --system-sqlite use system sqlite
54 --enable-fips enable FIPS checks
55 --enable-libpkix make libpkix part of the build
56 --enable-legacy-db enable the legacy db (libnssdbm)
57 --mozpkix-only build only static mozpkix and mozpkix-test libraries
58 support for this build option is limited
59 --disable-keylog disable support for logging key data to a file specified
60 by the SSLKEYLOGFILE environment variable
61 -D<gyp-option> pass an option directly to gyp
62 --rebuild build again using the last set of options provided
63 (all other arguments are ignored if --rebuild is used)