diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/package.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index d319da702b..c45928c9fe 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -66,6 +66,8 @@ class Llvm(CMakePackage): variant('build_type', default='Release', description='CMake build type', values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel')) + variant('omp_tsan', default=False, + description="Build with OpenMP capable thread sanitizer") variant('python', default=False, description="Install python bindings") extends('python', when='+python') @@ -576,6 +578,9 @@ class Llvm(CMakePackage): conflicts('%gcc@8:', when='@:5') conflicts('%gcc@:5.0.999', when='@8:') + # OMP TSAN exists in > 5.x + conflicts('+omp_tsan', when='@:5.99') + # Github issue #4986 patch('llvm_gcc7.patch', when='@4.0.0:4.0.1+lldb %gcc@7.0:') @@ -689,6 +694,9 @@ class Llvm(CMakePackage): cmake_args.append( '-DLLVM_TARGETS_TO_BUILD:STRING=' + ';'.join(targets)) + if '+omp_tsan' in spec: + cmake_args.append('-DLIBOMP_TSAN_SUPPORT=ON') + if spec.satisfies('@4.0.0:') and spec.satisfies('platform=linux'): cmake_args.append('-DCMAKE_BUILD_WITH_INSTALL_RPATH=1') return cmake_args |