jemalloc: Add variant to prepend public api with "je_" prefix (#10356)

This commit is contained in:
Jason Lee 2019-01-30 18:16:33 -07:00 committed by Peter Scheibel
parent 993745b919
commit c698384216

View file

@ -22,6 +22,7 @@ class Jemalloc(Package):
variant('stats', default=False, description='Enable heap statistics')
variant('prof', default=False, description='Enable heap profiling')
variant('je', default=False, description='Prepend the public API functions with "je_"')
def install(self, spec, prefix):
configure_args = ['--prefix=%s' % prefix, ]
@ -30,6 +31,8 @@ def install(self, spec, prefix):
configure_args.append('--enable-stats')
if '+prof' in spec:
configure_args.append('--enable-prof')
if '+je' in spec:
configure_args.append('--with-jemalloc-prefix=je_')
configure(*configure_args)