From 5404a5bb82f3fdb2e4faf67b3c46fc5daa13413d Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 6 Dec 2023 19:12:42 +0100 Subject: 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. --- var/spack/repos/builtin/packages/llvm/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'var/spack/repos/builtin/packages/llvm/package.py') 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") -- cgit v1.2.3-60-g2f50