diff options
author | Patrick Gartung <gartung@fnal.gov> | 2018-10-04 18:06:10 -0500 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2018-10-04 16:06:10 -0700 |
commit | 9b5f3d77f38e3e13d93cd109865c1bb7dd80bcb4 (patch) | |
tree | 8e56943e19e4203da3f2313ef6451465f4eba267 | |
parent | 2b3e7dbd93a918d6a9b9b344b4926be43d26b94b (diff) | |
download | spack-9b5f3d77f38e3e13d93cd109865c1bb7dd80bcb4.tar.gz spack-9b5f3d77f38e3e13d93cd109865c1bb7dd80bcb4.tar.bz2 spack-9b5f3d77f38e3e13d93cd109865c1bb7dd80bcb4.tar.xz spack-9b5f3d77f38e3e13d93cd109865c1bb7dd80bcb4.zip |
Valgrind: add ubsan and only64bit variants. (#9302)
* Add conflict for +ubsan when building with clang on MacOS
* only64bit is enabled by default
-rw-r--r-- | var/spack/repos/builtin/packages/valgrind/package.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/valgrind/package.py b/var/spack/repos/builtin/packages/valgrind/package.py index 095dd98232..a6009a1cff 100644 --- a/var/spack/repos/builtin/packages/valgrind/package.py +++ b/var/spack/repos/builtin/packages/valgrind/package.py @@ -51,7 +51,17 @@ class Valgrind(AutotoolsPackage): description='Activates MPI support for valgrind') variant('boost', default=True, description='Activates boost support for valgrind') + variant('only64bit', default=True, + description='Sets --enable-only64bit option for valgrind') + variant('ubsan', default=True, + description='Activates ubsan support for valgrind') + conflicts('+ubsan', when='platform=darwin %clang', + msg=""" +Cannot build libubsan with clang on macOS. +Otherwise with (Apple's) clang there is a linker error: +clang: error: unknown argument: '-static-libubsan' +""") depends_on('mpi', when='+mpi') depends_on('boost', when='+boost') @@ -66,14 +76,11 @@ class Valgrind(AutotoolsPackage): def configure_args(self): spec = self.spec options = [] - if not (spec.satisfies('%clang') and sys.platform == 'darwin'): - # Otherwise with (Apple's) clang there is a linker error: - # clang: error: unknown argument: '-static-libubsan' + if spec.satisfies('+ubsan'): options.append('--enable-ubsan') + if spec.satisfies('+only64bit'): + options.append('--enable-only64bit') if sys.platform == 'darwin': - options.extend([ - '--build=amd64-darwin', - '--enable-only64bit' - ]) + options.append('--build=amd64-darwin') return options |