summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2016-11-18 17:11:06 +0100
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2016-11-18 17:11:06 +0100
commit54dffec5d2d01c318ba393201c32e6149ff40b29 (patch)
tree54e7badaa2693e7c49f08a45afb5af5febe09fb9
parent5eb8f874bbd4026b238db1554dccf8b4eafc0761 (diff)
downloadnss-hg-54dffec5d2d01c318ba393201c32e6149ff40b29.tar.gz
Bug 1319011 - add gperftool support, r=ttaubert
Differential Revision: https://nss-review.dev.mozaws.net/D81
-rwxr-xr-xbuild.sh3
-rw-r--r--coreconf/config.gypi4
2 files changed, 7 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index ba96b05f8..730aba15b 100755
--- a/build.sh
+++ b/build.sh
@@ -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.
@@ -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
}
@@ -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
diff --git a/coreconf/config.gypi b/coreconf/config.gypi
index 99e61ec77..1a4a9c2c3 100644
--- a/coreconf/config.gypi
+++ b/coreconf/config.gypi
@@ -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',
},
@@ -271,6 +272,9 @@
'cflags': ['-m64'],
'ldflags': ['-m64'],
}],
+ [ 'use_pprof==1' , {
+ 'ldflags': [ '-lprofiler' ],
+ }],
],
}],
[ 'disable_werror==0 and (OS=="linux" or OS=="mac")', {