Skip to content

Commit

Permalink
Bug 1320964 - Fuzzing mode: Change sancov default r=franziskus
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Taubert committed Nov 30, 2016
1 parent b8889f5 commit a5c74f2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions build.sh
Expand Up @@ -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.
Expand Down Expand Up @@ -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/')
Expand All @@ -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)
Expand All @@ -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 ;;
Expand Down

0 comments on commit a5c74f2

Please sign in to comment.