summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index f00e9ba05..806d4fbc7 100755
--- a/build.sh
+++ b/build.sh
@@ -13,7 +13,7 @@ show_help() {
cat << EOF
Usage: ${0##*/} [-hcgv] [-j <n>] [--test] [--fuzz] [--scan-build[=output]]
- [-m32] [--opt|-o] [--asan] [--ubsan] [--sancov[=edge|bb|func]]
+ [-m32] [--opt|-o] [--asan] [--ubsan] [--sancov[=edge|bb|func|...]]
[--pprof] [--msan]
This script builds NSS with gyp and ninja.
@@ -54,6 +54,7 @@ rebuild_gyp=0
target=Debug
verbose=0
fuzz=0
+sancov_default=edge,indirect-calls,8bit-counters,trace-cmp
# parse parameters to store in config
params=$(echo "$*" | perl -pe 's/-c|-v|-g|-j [0-9]*|-h//g' | perl -pe 's/^\s*(.*?)\s*$/\1/')
@@ -78,10 +79,10 @@ enable_fuzz()
fuzz=1
nspr_sanitizer asan
nspr_sanitizer ubsan
- nspr_sanitizer sancov edge
+ nspr_sanitizer sancov $sancov_default
gyp_params+=(-Duse_asan=1)
gyp_params+=(-Duse_ubsan=1)
- gyp_params+=(-Duse_sancov=edge)
+ gyp_params+=(-Duse_sancov=$sancov_default)
# Adding debug symbols even for opt builds.
nspr_opt+=(--enable-debug-symbols)
@@ -102,7 +103,7 @@ while [ $# -gt 0 ]; do
-m32|--m32) build_64=0 ;;
--asan) gyp_params+=(-Duse_asan=1); nspr_sanitizer asan ;;
--ubsan) gyp_params+=(-Duse_ubsan=1); nspr_sanitizer ubsan ;;
- --sancov) gyp_params+=(-Duse_sancov=edge); nspr_sanitizer sancov edge ;;
+ --sancov) gyp_params+=(-Duse_sancov=$sancov_default); nspr_sanitizer sancov $sancov_default ;;
--sancov=?*) gyp_params+=(-Duse_sancov="${1#*=}"); nspr_sanitizer sancov "${1#*=}" ;;
--pprof) gyp_params+=(-Duse_pprof=1) ;;
--msan) gyp_params+=(-Duse_msan=1); nspr_sanitizer msan ;;