summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2016-11-30 09:09:43 +0100
committerTim Taubert <ttaubert@mozilla.com>2016-11-30 09:09:43 +0100
commit08dcb9ca4f24ba4470a8048343e7eddaf81ec096 (patch)
tree8ea0a3de264d3c4212d0f2478dda9c46e09380ce /build.sh
parent653a44d248ef5507e33060c7ff1192d9c74bc5fa (diff)
downloadnss-hg-08dcb9ca4f24ba4470a8048343e7eddaf81ec096.tar.gz
Bug 1320964 - Fuzzing mode: Change sancov default r=franziskus
Differential Revision: https://nss-review.dev.mozaws.net/D105
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 ;;