summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-05-23 14:21:11 +0200
committerGitHub <noreply@github.com>2022-05-23 14:21:11 +0200
commit3bc656808c6453f1f76353f32885719cfaba4eb4 (patch)
treed4b3f9535c3001d7529c391eaab6d3d1df6f33a9
parent7ded692a768341ff5c0fba099befeff65f012632 (diff)
downloadspack-3bc656808c6453f1f76353f32885719cfaba4eb4.tar.gz
spack-3bc656808c6453f1f76353f32885719cfaba4eb4.tar.bz2
spack-3bc656808c6453f1f76353f32885719cfaba4eb4.tar.xz
spack-3bc656808c6453f1f76353f32885719cfaba4eb4.zip
llvm: make "omp_as_runtime" variant conditional (#30782)
fixes #30700 To avoid clingo adding penalties for not using the default value for a variant, it's better to model the variant as conditional where possible.
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 690987b61b..476cf20879 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -165,6 +165,7 @@ class Llvm(CMakePackage, CudaPackage):
variant(
"omp_as_runtime",
default=True,
+ when='+clang @12:',
description="Build OpenMP runtime via ENABLE_RUNTIME by just-built Clang",
)
variant('code_signing', default=False,
@@ -268,10 +269,6 @@ class Llvm(CMakePackage, CudaPackage):
# OMP TSAN exists in > 5.x
conflicts("+omp_tsan", when="@:5")
- # OpenMP via ENABLE_RUNTIME restrictions
- conflicts("+omp_as_runtime", when="~clang", msg="omp_as_runtime requires clang being built.")
- conflicts("+omp_as_runtime", when="@:11.1", msg="omp_as_runtime works since LLVM 12.")
-
# cuda_arch value must be specified
conflicts("cuda_arch=none", when="+cuda", msg="A value for cuda_arch must be specified.")