summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2020-02-22 14:09:22 -0500
committerGitHub <noreply@github.com>2020-02-22 13:09:22 -0600
commit629c69d383fc723ea1c6a4554d224cf367e66cfb (patch)
treeb87837cd21301c2d71702bcd1b445d985fdbbce9 /var
parent0ea6bab984abee943d93cdfa90273b7a7aabcf8f (diff)
downloadspack-629c69d383fc723ea1c6a4554d224cf367e66cfb.tar.gz
spack-629c69d383fc723ea1c6a4554d224cf367e66cfb.tar.bz2
spack-629c69d383fc723ea1c6a4554d224cf367e66cfb.tar.xz
spack-629c69d383fc723ea1c6a4554d224cf367e66cfb.zip
Automatically run LLDB codesign script on mac (#15169)
Newer versions of LLVM provide a one-line command to set up LLDB code signing. Now the build will abort only if this command fails. https://lldb.llvm.org/resources/build.html#code-signing-on-macos
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 871559d453..1644a8e750 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -162,11 +162,18 @@ class Llvm(CMakePackage):
llvm_check_file)
except ProcessError:
- explanation = ('The "lldb_codesign" identity must be available'
- ' to build LLVM with LLDB. See https://lldb.llvm'
- '.org/resources/build.html#code-signing-on-macos'
- 'for details on how to create this identity.')
- raise RuntimeError(explanation)
+ # Newer LLVM versions have a simple script that sets up
+ # automatically
+ setup = Executable("./lldb/scripts/macos-setup-codesign.sh")
+ try:
+ setup()
+ except Exception:
+ raise RuntimeError(
+ 'The "lldb_codesign" identity must be available to build '
+ 'LLVM with LLDB. See https://lldb.llvm.org/resources/'
+ 'build.html#code-signing-on-macos for details on how to '
+ 'create this identity.'
+ )
def setup_build_environment(self, env):
env.append_flags('CXXFLAGS', self.compiler.cxx11_flag)