llvm-amdgpu: add variant: openmp (bool) (#20759)
This commit is contained in:
parent
5dacb1b550
commit
d6ba623669
1 changed files with 14 additions and 1 deletions
|
@ -25,12 +25,15 @@ class LlvmAmdgpu(CMakePackage):
|
||||||
|
|
||||||
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
|
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.4.3:', type='build', when='@:3.8.99')
|
||||||
depends_on('cmake@3.13.4:', type='build', when='@3.9.0:')
|
depends_on('cmake@3.13.4:', type='build', when='@3.9.0:')
|
||||||
depends_on('python', type='build')
|
depends_on('python', type='build')
|
||||||
depends_on('z3', type='link')
|
depends_on('z3', type='link')
|
||||||
depends_on('zlib', type='link')
|
depends_on('zlib', type='link')
|
||||||
depends_on('ncurses+termlib', type='link')
|
depends_on('ncurses+termlib', type='link')
|
||||||
|
depends_on('libelf', type='link', when='+openmp')
|
||||||
|
|
||||||
# Will likely only be fixed in LLVM 12 upstream
|
# Will likely only be fixed in LLVM 12 upstream
|
||||||
patch('fix-system-zlib-ncurses.patch', when='@3.5.0:3.8.0')
|
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']
|
install_targets = ['clang-tidy', 'install']
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
|
llvm_projects = [
|
||||||
|
'clang',
|
||||||
|
'lld',
|
||||||
|
'clang-tools-extra',
|
||||||
|
'compiler-rt'
|
||||||
|
]
|
||||||
|
|
||||||
|
if '+openmp' in self.spec:
|
||||||
|
llvm_projects.append('openmp')
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
'-DLLVM_ENABLE_PROJECTS=clang;lld;clang-tools-extra;compiler-rt',
|
'-DLLVM_ENABLE_PROJECTS={0}'.format(';'.join(llvm_projects)),
|
||||||
'-DLLVM_ENABLE_ASSERTIONS=1'
|
'-DLLVM_ENABLE_ASSERTIONS=1'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue