From 79669ac6474943dc4f6f27e847fbd04515f43bb1 Mon Sep 17 00:00:00 2001 From: scheibelp Date: Fri, 11 May 2018 12:32:26 -0700 Subject: llvm: replace @when with internal check in @run_before (#8092) Fixes #8088 #7012 added a @when condition for a @run_before check to constrain that check to only run on Darwin. @when is intended to be used to choose one of several different implementations of a given function and cannot be used to conditionally deactivate a check altogether. This replaces the external decorator with a check that executes at the beginning of the function. --- var/spack/repos/builtin/packages/llvm/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 7182b5b158..8d5d2a6ec8 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -415,9 +415,10 @@ class Llvm(CMakePackage): # Github issue #4986 patch('llvm_gcc7.patch', when='@4.0.0:4.0.1+lldb %gcc@7.0:') - @when('+lldb platform=darwin') @run_before('cmake') def check_darwin_lldb_codesign_requirement(self): + if not self.spec.satisfies('+lldb platform=darwin'): + return codesign = which('codesign') cp = which('cp') mkdir('tmp') -- cgit v1.2.3-70-g09d2