Skip to content
Snippets Groups Projects
Commit 441401bb authored by Dr Owain Kenway's avatar Dr Owain Kenway Committed by Todd Gamblin
Browse files

llvm: don't build CppBackend for flang versions of llvm (#11841)

The version of LLVM used by flang is new enough that CppBackend doesn't exist.  Unfortunately, `flang-xxxxxxxx` is seen as < `3.9.0` by the version check.  

* add a special case for `flang` versions.
parent cf76a143
No related branches found
No related tags found
No related merge requests found
...@@ -664,10 +664,14 @@ def cmake_args(self): ...@@ -664,10 +664,14 @@ 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'] targets = ['NVPTX', 'AMDGPU']
if spec.version < Version('3.9.0'): if (spec.version < Version('3.9.0')
and spec.version[0] != 'flang'):
# 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)
# This also applies to the version of llvm used by flang
# hence the test to see if the version starts with "flang".
targets.append('CppBackend') targets.append('CppBackend')
if 'x86' in spec.architecture.target.lower(): if 'x86' in spec.architecture.target.lower():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment