summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorOmar Padron <omar.padron@kitware.com>2019-03-25 20:43:18 -0400
committerPeter Scheibel <scheibel1@llnl.gov>2019-03-25 19:43:18 -0500
commitbf03edb51b2c5e46501ed43d97d63f32264edefe (patch)
tree08922c089c8c9980e2e5831e08ebf25b81843b1e /var
parenta88b540723b6c4c5c17afdd71024e4ad739498ca (diff)
downloadspack-bf03edb51b2c5e46501ed43d97d63f32264edefe.tar.gz
spack-bf03edb51b2c5e46501ed43d97d63f32264edefe.tar.bz2
spack-bf03edb51b2c5e46501ed43d97d63f32264edefe.tar.xz
spack-bf03edb51b2c5e46501ed43d97d63f32264edefe.zip
LLVM package: disable CUDA (#10858)
This avoids using a system-installed CUDA package. In the future a variant can be added to allow using Spack-installed CUDA, but for now CUDA support is always disabled.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 4f7e1583a0..a2e6ae1a94 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -30,6 +30,17 @@ class Llvm(CMakePackage):
variant('clang', default=True,
description="Build the LLVM C/C++/Objective-C compiler frontend")
+
+ # TODO: The current version of this package unconditionally disables CUDA.
+ # Better would be to add a "cuda" variant that:
+ # - Adds dependency on the "cuda" package when enabled
+ # - Sets the necessary CMake flags when enabled
+ # - Disables CUDA (as this current version does) only when the
+ # variant is also disabled.
+
+ # variant('cuda', default=False,
+ # description="Build the LLVM with CUDA features enabled")
+
variant('lldb', default=True, description="Build the LLVM debugger")
variant('lld', default=True, description="Build the LLVM linker")
variant('internal_unwind', default=True,
@@ -588,6 +599,14 @@ class Llvm(CMakePackage):
'-DPYTHON_EXECUTABLE:PATH={0}'.format(spec['python'].command.path),
]
+ # TODO: Instead of unconditionally disabling CUDA, add a "cuda" variant
+ # (see TODO above), and set the paths if enabled.
+ cmake_args.extend([
+ '-DCUDA_TOOLKIT_ROOT_DIR:PATH=IGNORE',
+ '-DCUDA_SDK_ROOT_DIR:PATH=IGNORE',
+ '-DCUDA_NVCC_EXECUTABLE:FILEPATH=IGNORE',
+ '-DLIBOMPTARGET_DEP_CUDA_DRIVER_LIBRARIES:STRING=IGNORE'])
+
if '+gold' in spec:
cmake_args.append('-DLLVM_BINUTILS_INCDIR=' +
spec['binutils'].prefix.include)