valgrind: add support for shared and static libs(#30028)
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
parent
6b62a15ab6
commit
bf1ef4bc37
@ -45,6 +45,8 @@ class Valgrind(AutotoolsPackage, SourcewarePackage):
|
|||||||
description='Sets --enable-only64bit option for valgrind')
|
description='Sets --enable-only64bit option for valgrind')
|
||||||
variant('ubsan', default=False,
|
variant('ubsan', default=False,
|
||||||
description='Activates ubsan support for valgrind')
|
description='Activates ubsan support for valgrind')
|
||||||
|
variant('libs', default='shared,static', values=('shared', 'static'),
|
||||||
|
multi=True, description='Build shared libs, static libs or both')
|
||||||
|
|
||||||
conflicts('+ubsan', when='%apple-clang',
|
conflicts('+ubsan', when='%apple-clang',
|
||||||
msg="""
|
msg="""
|
||||||
@ -73,12 +75,13 @@ class Valgrind(AutotoolsPackage, SourcewarePackage):
|
|||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
options = []
|
options = self.enable_or_disable('libs')
|
||||||
if spec.satisfies('+ubsan'):
|
if spec.satisfies('+ubsan'):
|
||||||
options.append('--enable-ubsan')
|
options.append('--enable-ubsan')
|
||||||
if spec.satisfies('+only64bit'):
|
if spec.satisfies('+only64bit'):
|
||||||
options.append('--enable-only64bit')
|
options.append('--enable-only64bit')
|
||||||
|
if spec.satisfies('~mpi'):
|
||||||
|
options.append('--without-mpicc')
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
options.append('--build=amd64-darwin')
|
options.append('--build=amd64-darwin')
|
||||||
return options
|
return options
|
||||||
|
Loading…
Reference in New Issue
Block a user