From 5d89fb8dfa200072fbbd2d2945c0a38917477ae1 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Wed, 30 Dec 2015 16:56:00 -0800 Subject: [PATCH] ensure that clang-query gets installed --- var/spack/packages/llvm/package.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/var/spack/packages/llvm/package.py b/var/spack/packages/llvm/package.py index eeb2c11fe2..19d82d81b7 100644 --- a/var/spack/packages/llvm/package.py +++ b/var/spack/packages/llvm/package.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os, shutil class Llvm(Package): @@ -182,7 +183,7 @@ def install(self, spec, prefix): if '+lto' in spec: cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + os.path.join( spec['binutils'].prefix, 'include')) if '+polly' in spec: - cmake_args.append('-DPOLLY_LINK_INTO_TOOLS:Bool=ON') + cmake_args.append('-DLINK_POLLY_INTO_TOOLS:Bool=ON') else: cmake_args.append('-DLLVM_EXTERNAL_POLLY_BUILD:Bool=OFF') @@ -205,6 +206,10 @@ def install(self, spec, prefix): raise SpackException('The lldb variant requires the clang variant to be selected') with working_dir('spack-build', create=True): - cmake(*cmake_args) - make() + # cmake(*cmake_args) + # make() make("install") + query_path = os.path.join('bin', 'clang-query') + # Manually install clang-query, because llvm doesn't... + if os.path.exists(query_path): + shutil.copy(query_path, os.path.join(prefix, 'bin'))