summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr Owain Kenway <o.kenway@ucl.ac.uk>2019-07-01 01:04:29 +0100
committerTodd Gamblin <tgamblin@llnl.gov>2019-06-30 17:04:29 -0700
commit441401bb8bed5cccc48ff259d72b9717c6e5d635 (patch)
treedb662c6b115b4f34537af766473ef1595bf0e2b2
parentcf76a143a24545de6dd9d88d849504a33f742f8f (diff)
downloadspack-441401bb8bed5cccc48ff259d72b9717c6e5d635.tar.gz
spack-441401bb8bed5cccc48ff259d72b9717c6e5d635.tar.bz2
spack-441401bb8bed5cccc48ff259d72b9717c6e5d635.tar.xz
spack-441401bb8bed5cccc48ff259d72b9717c6e5d635.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index c19c623cc9..d319da702b 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -664,10 +664,14 @@ class Llvm(CMakePackage):
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')
+ and spec.version[0] != 'flang'):
# Starting in 3.9.0 CppBackend is no longer a target (see
# LLVM_ALL_TARGETS in llvm's top-level CMakeLists.txt for
# 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')
if 'x86' in spec.architecture.target.lower():