diff options
author | scheibelp <scheibel1@llnl.gov> | 2018-05-11 12:32:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-11 12:32:26 -0700 |
commit | 79669ac6474943dc4f6f27e847fbd04515f43bb1 (patch) | |
tree | b4e5006a914f9e92ac408a5cf905e5626312578c | |
parent | 5bc970f9b664f73e03e4825891fa7b39b82dd846 (diff) | |
download | spack-79669ac6474943dc4f6f27e847fbd04515f43bb1.tar.gz spack-79669ac6474943dc4f6f27e847fbd04515f43bb1.tar.bz2 spack-79669ac6474943dc4f6f27e847fbd04515f43bb1.tar.xz spack-79669ac6474943dc4f6f27e847fbd04515f43bb1.zip |
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.
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/package.py | 3 |
1 files changed, 2 insertions, 1 deletions
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') |