summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2019-05-02 16:21:06 -0400
committerOmar Padron <omar.padron@kitware.com>2019-05-02 16:21:06 -0400
commitf44443ed3a2b99a6a17a6c8d230be886842ae90e (patch)
tree108f125a51e1aeb1f463a71e9fcf926221581a05
parent5b82bf47af78a95ff38d0abc4e24255962914639 (diff)
downloadspack-f44443ed3a2b99a6a17a6c8d230be886842ae90e.tar.gz
spack-f44443ed3a2b99a6a17a6c8d230be886842ae90e.tar.bz2
spack-f44443ed3a2b99a6a17a6c8d230be886842ae90e.tar.xz
spack-f44443ed3a2b99a6a17a6c8d230be886842ae90e.zip
llvm: depend on python only when +python (#11348)
Based on the LLVM documentation [1], Python is used to run the automated test suite. Therefore is it always a dependency for LLVM. However, if build without Python (~python), we limit it to a build time dependency. Note that py-lit is not added as a spack dependency even though it is available as a spack package. This is because it is already included in llvm and llvm is difficult to configure using an external py-lit (several CMake variables to set correctly). Additionally, having py-lit as a spack dependency adds Python as a runtime dependency for llvm even though it is not required at runtime. [1] https://llvm.org/docs/GettingStarted.html#requirements
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 92c31c417f..605da19dae 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -71,11 +71,12 @@ class Llvm(CMakePackage):
# Build dependency
depends_on('cmake@3.4.3:', type='build')
+ depends_on('python@2.7:2.8', when='@:4.999 ~python', type='build')
+ depends_on('python', when='@5: ~python', type='build')
# Universal dependency
- depends_on('python@2.7:2.8', when='@:4.999')
- depends_on('python')
- depends_on('py-lit', type=('build', 'run'))
+ depends_on('python@2.7:2.8', when='@:4.999+python')
+ depends_on('python', when='@5:+python')
# openmp dependencies
depends_on('perl-data-dumper', type=('build'))
@@ -607,7 +608,6 @@ class Llvm(CMakePackage):
def cmake_args(self):
spec = self.spec
-
cmake_args = [
'-DLLVM_REQUIRES_RTTI:BOOL=ON',
'-DLLVM_ENABLE_RTTI:BOOL=ON',