valgrind: add support for shared and static libs(#30028)

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
This commit is contained in:
iarspider 2022-04-19 14:26:26 +02:00 committed by GitHub
parent 6b62a15ab6
commit bf1ef4bc37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,8 @@ class Valgrind(AutotoolsPackage, SourcewarePackage):
description='Sets --enable-only64bit option for valgrind')
variant('ubsan', default=False,
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',
msg="""
@ -73,12 +75,13 @@ class Valgrind(AutotoolsPackage, SourcewarePackage):
def configure_args(self):
spec = self.spec
options = []
options = self.enable_or_disable('libs')
if spec.satisfies('+ubsan'):
options.append('--enable-ubsan')
if spec.satisfies('+only64bit'):
options.append('--enable-only64bit')
if spec.satisfies('~mpi'):
options.append('--without-mpicc')
if sys.platform == 'darwin':
options.append('--build=amd64-darwin')
return options