llvm: Adjust default supported targets
The default install for llvm should just be the common typical case, i.e. support for local host and cpu architectures. Enablingsupport for the wide array of auxiliary architectures should be explicit rather than implicit.
This commit is contained in:
parent
4a83b4710c
commit
e4ce4e5c2c
1 changed files with 4 additions and 5 deletions
|
@ -60,7 +60,7 @@ class Llvm(CMakePackage):
|
||||||
variant('link_dylib', default=False,
|
variant('link_dylib', default=False,
|
||||||
description="Build and link the libLLVM shared library rather "
|
description="Build and link the libLLVM shared library rather "
|
||||||
"than static")
|
"than static")
|
||||||
variant('all_targets', default=True,
|
variant('all_targets', default=False,
|
||||||
description="Build all supported targets, default targets "
|
description="Build all supported targets, default targets "
|
||||||
"<current arch>,NVPTX,AMDGPU,CppBackend")
|
"<current arch>,NVPTX,AMDGPU,CppBackend")
|
||||||
variant('build_type', default='Release',
|
variant('build_type', default='Release',
|
||||||
|
@ -663,13 +663,12 @@ def cmake_args(self):
|
||||||
|
|
||||||
if '+all_targets' not in spec: # all is default on cmake
|
if '+all_targets' not in spec: # all is default on cmake
|
||||||
|
|
||||||
|
targets = ['NVPTX', 'AMDGPU']
|
||||||
if spec.version < Version('3.9.0'):
|
if spec.version < Version('3.9.0'):
|
||||||
targets = ['CppBackend', 'NVPTX', 'AMDGPU']
|
|
||||||
else:
|
|
||||||
# Starting in 3.9.0 CppBackend is no longer a target (see
|
# Starting in 3.9.0 CppBackend is no longer a target (see
|
||||||
# LLVM_ALL_TARGETS in llvm's top-level CMakeLists.txt for
|
# LLVM_ALL_TARGETS in llvm's top-level CMakeLists.txt for
|
||||||
# the complete list of targets)
|
# the complete list of targets)
|
||||||
targets = ['NVPTX', 'AMDGPU']
|
targets.append('CppBackend')
|
||||||
|
|
||||||
if 'x86' in spec.architecture.target.lower():
|
if 'x86' in spec.architecture.target.lower():
|
||||||
targets.append('X86')
|
targets.append('X86')
|
||||||
|
@ -684,7 +683,7 @@ def cmake_args(self):
|
||||||
targets.append('PowerPC')
|
targets.append('PowerPC')
|
||||||
|
|
||||||
cmake_args.append(
|
cmake_args.append(
|
||||||
'-DLLVM_TARGETS_TO_BUILD:Bool=' + ';'.join(targets))
|
'-DLLVM_TARGETS_TO_BUILD:STRING=' + ';'.join(targets))
|
||||||
|
|
||||||
if spec.satisfies('@4.0.0:') and spec.satisfies('platform=linux'):
|
if spec.satisfies('@4.0.0:') and spec.satisfies('platform=linux'):
|
||||||
cmake_args.append('-DCMAKE_BUILD_WITH_INSTALL_RPATH=1')
|
cmake_args.append('-DCMAKE_BUILD_WITH_INSTALL_RPATH=1')
|
||||||
|
|
Loading…
Reference in a new issue