diff options
Diffstat (limited to 'var/spack/packages/jemalloc/package.py')
-rw-r--r-- | var/spack/packages/jemalloc/package.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/var/spack/packages/jemalloc/package.py b/var/spack/packages/jemalloc/package.py index ff946ae821..8cec9ea75b 100644 --- a/var/spack/packages/jemalloc/package.py +++ b/var/spack/packages/jemalloc/package.py @@ -7,8 +7,18 @@ class Jemalloc(Package): version('4.0.4', '687c5cc53b9a7ab711ccd680351ff988') + variant('stats', default=False, description='Enable heap statistics') + variant('prof', default=False, description='Enable heap profiling') + def install(self, spec, prefix): - configure('--prefix=%s' % prefix) + configure_args = ['--prefix=%s' % prefix,] + + if '+stats' in spec: + configure_args.append('--enable-stats') + if '+prof' in spec: + configure_args.append('--enable-prof') + + configure(*configure_args) make() make("install") |