Skip to content

Commit

Permalink
Bug 1319011 - add gperftool support, r=ttaubert
Browse files Browse the repository at this point in the history
Differential Revision: https://nss-review.dev.mozaws.net/D81

--HG--
extra : rebase_source : 006a0203201871320cf9ffe81ace5fabc2683025
extra : amend_source : 5d10c6508b93b00bec120111f2a6b247d2fd84d8
  • Loading branch information
franziskuskiefer committed Nov 18, 2016
1 parent db26491 commit 0a81ae8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.sh
Expand Up @@ -14,6 +14,7 @@ cat << EOF
Usage: ${0##*/} [-hcgv] [-j <n>] [--test] [--fuzz] [--scan-build[=output]]
[-m32] [--opt|-o] [--asan] [--ubsan] [--sancov[=edge|bb|func]]
[--pprof]
This script builds NSS with gyp and ninja.
Expand All @@ -37,6 +38,7 @@ NSS build tool options:
--ubsan do an ubsan build
--sancov do sanitize coverage builds
--sancov=func sets coverage to function level for example
--pprof build with gperftool support
EOF
}

Expand Down Expand Up @@ -101,6 +103,7 @@ while [ $# -gt 0 ]; do
--ubsan) gyp_params+=(-Duse_ubsan=1); nspr_sanitizer ubsan ;;
--sancov) gyp_params+=(-Duse_sancov=edge); nspr_sanitizer sancov edge ;;
--sancov=?*) gyp_params+=(-Duse_sancov="${1#*=}"); nspr_sanitizer sancov "${1#*=}" ;;
--pprof) gyp_params+=(-Duse_pprof=1) ;;
*) show_help; exit ;;
esac
shift
Expand Down
4 changes: 4 additions & 0 deletions coreconf/config.gypi
Expand Up @@ -97,6 +97,7 @@
'test_build%': 0,
'fuzz%': 0,
'sign_libs%': 1,
'use_pprof%': 0,
'nss_public_dist_dir%': '<(nss_dist_dir)/public',
'nss_private_dist_dir%': '<(nss_dist_dir)/private',
},
Expand Down Expand Up @@ -271,6 +272,9 @@
'cflags': ['-m64'],
'ldflags': ['-m64'],
}],
[ 'use_pprof==1' , {
'ldflags': [ '-lprofiler' ],
}],
],
}],
[ 'disable_werror==0 and (OS=="linux" or OS=="mac")', {
Expand Down

0 comments on commit 0a81ae8

Please sign in to comment.