diff options
author | eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> | 2021-01-10 10:57:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 19:57:28 +0100 |
commit | d6ba623669d4fe747842a57c9a1e4d41c1fb59df (patch) | |
tree | 59a23a52ddddd3df8dc787bcd370d3f688d6c7b0 | |
parent | 5dacb1b550022062764eec64f0b817d8e5b11a9e (diff) | |
download | spack-d6ba623669d4fe747842a57c9a1e4d41c1fb59df.tar.gz spack-d6ba623669d4fe747842a57c9a1e4d41c1fb59df.tar.bz2 spack-d6ba623669d4fe747842a57c9a1e4d41c1fb59df.tar.xz spack-d6ba623669d4fe747842a57c9a1e4d41c1fb59df.zip |
llvm-amdgpu: add variant: openmp (bool) (#20759)
-rw-r--r-- | var/spack/repos/builtin/packages/llvm-amdgpu/package.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py index 0973976cd6..80a9139cd2 100644 --- a/var/spack/repos/builtin/packages/llvm-amdgpu/package.py +++ b/var/spack/repos/builtin/packages/llvm-amdgpu/package.py @@ -25,12 +25,15 @@ class LlvmAmdgpu(CMakePackage): variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') + variant('openmp', default=True, description='Enable OpenMP') + depends_on('cmake@3.4.3:', type='build', when='@:3.8.99') depends_on('cmake@3.13.4:', type='build', when='@3.9.0:') depends_on('python', type='build') depends_on('z3', type='link') depends_on('zlib', type='link') depends_on('ncurses+termlib', type='link') + depends_on('libelf', type='link', when='+openmp') # Will likely only be fixed in LLVM 12 upstream patch('fix-system-zlib-ncurses.patch', when='@3.5.0:3.8.0') @@ -43,8 +46,18 @@ class LlvmAmdgpu(CMakePackage): install_targets = ['clang-tidy', 'install'] def cmake_args(self): + llvm_projects = [ + 'clang', + 'lld', + 'clang-tools-extra', + 'compiler-rt' + ] + + if '+openmp' in self.spec: + llvm_projects.append('openmp') + args = [ - '-DLLVM_ENABLE_PROJECTS=clang;lld;clang-tools-extra;compiler-rt', + '-DLLVM_ENABLE_PROJECTS={0}'.format(';'.join(llvm_projects)), '-DLLVM_ENABLE_ASSERTIONS=1' ] |