summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2023-12-06 19:12:42 +0100
committerGitHub <noreply@github.com>2023-12-06 19:12:42 +0100
commit5404a5bb82f3fdb2e4faf67b3c46fc5daa13413d (patch)
tree530b5242bf6d74b249831413bac140ee536e1e18 /var
parentb522d8f610e5cf74c949693f816ef4487ddfc2cb (diff)
downloadspack-5404a5bb82f3fdb2e4faf67b3c46fc5daa13413d.tar.gz
spack-5404a5bb82f3fdb2e4faf67b3c46fc5daa13413d.tar.bz2
spack-5404a5bb82f3fdb2e4faf67b3c46fc5daa13413d.tar.xz
spack-5404a5bb82f3fdb2e4faf67b3c46fc5daa13413d.zip
llvm: reformulate a when condition to avoid tautology (#41461)
The condition on swig can be interpreted as "true if true, false if false" and gives clingo the option to add swig or not. If not other optimization criteria break the tie, then the concretization is non-deterministic.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index abf3dee6b4..7e38b04e09 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -308,14 +308,14 @@ class Llvm(CMakePackage, CudaPackage):
depends_on("swig", when="+python")
depends_on("xz")
- # Use ^swig cause it's triggered by both python & lua scripting in lldb
- with when("^swig"):
- depends_on("swig@2:", when="@10:")
- depends_on("swig@3:", when="@12:")
- depends_on("swig@4:", when="@17:")
- # Commits f0a25fe0b746f56295d5c02116ba28d2f965c175 and
- # 81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63 fixed swig 4.1 support
- depends_on("swig@:4.0", when="@:15")
+ for _when_spec in ("+lldb+python", "+lldb+lua"):
+ with when(_when_spec):
+ depends_on("swig@2:", when="@10:")
+ depends_on("swig@3:", when="@12:")
+ depends_on("swig@4:", when="@17:")
+ # Commits f0a25fe0b746f56295d5c02116ba28d2f965c175 and
+ # 81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63 fixed swig 4.1 support
+ depends_on("swig@:4.0", when="@:15")
# gold support, required for some features
depends_on("binutils+gold+ld+plugins+headers", when="+gold")