Skip to content
Snippets Groups Projects
Commit 3e3667f2 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Revert "removing check as it can cause failures in zsh"

This reverts commit 496e4856.

Undo overly large set of changes -- LLVM wasn't ready.  Tom can
recommit just the zsh stuff.
parent 496e4856
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
# avoids the need to come up with a user-friendly naming scheme for # avoids the need to come up with a user-friendly naming scheme for
# spack dotfiles. # spack dotfiles.
######################################################################## ########################################################################
arrtest[0]='test' || (echo 'Failure: arrays not supported in this version of bash.' && exit 2)
function spack { function spack {
# save raw arguments into an array before butchering them # save raw arguments into an array before butchering them
......
...@@ -11,7 +11,6 @@ class Binutils(Package): ...@@ -11,7 +11,6 @@ class Binutils(Package):
# Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell # Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell
variant('krellpatch', default=False, description="build with openspeedshop based patch.") variant('krellpatch', default=False, description="build with openspeedshop based patch.")
variant('gold', default=True, description="build the gold linker")
patch('binutilskrell-2.24.patch', when='@2.24+krellpatch') patch('binutilskrell-2.24.patch', when='@2.24+krellpatch')
variant('libiberty', default=False, description='Also install libiberty.') variant('libiberty', default=False, description='Also install libiberty.')
...@@ -27,10 +26,6 @@ def install(self, spec, prefix): ...@@ -27,10 +26,6 @@ def install(self, spec, prefix):
'--enable-targets=all', '--enable-targets=all',
'--with-sysroot=/'] '--with-sysroot=/']
if '+gold' in spec:
configure_args.append('--enable-gold')
configure_args.append('--enable-plugins')
if '+libiberty' in spec: if '+libiberty' in spec:
configure_args.append('--enable-install-libiberty') configure_args.append('--enable-install-libiberty')
......
...@@ -36,42 +36,20 @@ class Clang(Package): ...@@ -36,42 +36,20 @@ class Clang(Package):
homepage = 'http://clang.llvm.org' homepage = 'http://clang.llvm.org'
url = 'http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz' url = 'http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz'
clang_url = 'http://llvm.org/releases/%(version)s/cfe-%(version)s.src.tar.xz' depends_on('llvm@3.7.0', when='@3.7.0')
depends_on('llvm@3.6.2', when='@3.6.2')
resources = { depends_on('llvm@3.5.1', when='@3.5.1')
'clang-tools-extra' : {
'url' : 'http://llvm.org/releases/%(version)s/clang-tools-extra-%(version)s.src.tar.xz', version('3.7.0', '8f9d27335e7331cf0a4711e952f21f01', url='http://llvm.org/releases/3.7.0/cfe-3.7.0.src.tar.xz')
'destination' : 'tools' version('3.6.2', 'ff862793682f714bb7862325b9c06e20', url='http://llvm.org/releases/3.6.2/cfe-3.6.2.src.tar.xz')
}, version('3.5.1', '93f9532f8f7e6f1d8e5c1116907051cb', url='http://llvm.org/releases/3.5.1/cfe-3.5.1.src.tar.xz')
}
releases = [ ##########
{ # @3.7.0
'version' : '3.7.0', resource(name='clang-tools-extra',
'md5':'8f9d27335e7331cf0a4711e952f21f01', url='http://llvm.org/releases/3.7.0/clang-tools-extra-3.7.0.src.tar.xz',
'resources' : { 'clang-tools-extra' : 'd5a87dacb65d981a427a536f6964642e' } md5='d5a87dacb65d981a427a536f6964642e', destination='tools', when='@3.7.0')
}, ##########
{
'version' : '3.6.2',
'md5':'ff862793682f714bb7862325b9c06e20',
'resources' : { 'clang-tools-extra' : '3ebc1dc41659fcec3db1b47d81575e06' }
},
{
'version' : '3.5.1',
'md5':'93f9532f8f7e6f1d8e5c1116907051cb',
'resources' : { 'clang-tools-extra' : 'f13f31ed3038acadc6fa63fef812a246' }
},
]
for release in releases:
version(release['version'], release['md5'], url=clang_url % release)
depends_on('llvm@%(version)s' % release, when='@%(version)s' % release)
for name, md5 in release['resources'].items():
resource(name=name,
url=resources[name]['url'] % release,
md5=md5,
destination=resources[name]['destination'],
when='@%(version)s' % release)
def install(self, spec, prefix): def install(self, spec, prefix):
env['CXXFLAGS'] = self.compiler.cxx11_flag env['CXXFLAGS'] = self.compiler.cxx11_flag
...@@ -114,4 +92,4 @@ def do_link(source_dir, destination_dir): ...@@ -114,4 +92,4 @@ def do_link(source_dir, destination_dir):
# Link folder and files in lib # Link folder and files in lib
llvm_dir = clang_lib_dir_at(spec['llvm'].prefix) llvm_dir = clang_lib_dir_at(spec['llvm'].prefix)
clang_dir = clang_lib_dir_at(self.prefix) clang_dir = clang_lib_dir_at(self.prefix)
do_link(llvm_dir, clang_dir) do_link(llvm_dir, clang_dir)
\ No newline at end of file
...@@ -52,45 +52,19 @@ class Gcc(Package): ...@@ -52,45 +52,19 @@ class Gcc(Package):
depends_on("mpfr") depends_on("mpfr")
depends_on("gmp") depends_on("gmp")
depends_on("mpc") # when @4.5: depends_on("mpc") # when @4.5:
depends_on("binutils~libiberty+gold") depends_on("binutils~libiberty")
# Save these until we can do optional deps. # Save these until we can do optional deps.
depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE) depends_on("isl", when=DEPENDS_ON_ISL_PREDICATE)
#depends_on("ppl") #depends_on("ppl")
#depends_on("cloog") #depends_on("cloog")
variant('lang_go', default=True, description="Include support for the go language")
variant('lang_fortran', default=True, description="Include support for the Fortran language")
variant('lang_c', default=True, description="Include support for the C language")
variant('lang_cxx', default=True, description="Include support for the C++ language")
variant('lang_ada', default=False, description="Include support for the ada language")
variant('lang_java', default=False, description="Include support for the java language")
variant('lang_objc', default=True, description="Include support for the Objective-C language")
variant('lang_objcxx', default=True, description="Include support for the Objective-C++ language")
variant('jit', default=False, description="Include support for JIT")
def install(self, spec, prefix): def install(self, spec, prefix):
# libjava/configure needs a minor fix to install into spack paths. # libjava/configure needs a minor fix to install into spack paths.
filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True) filter_file(r"'@.*@'", "'@[[:alnum:]]*@'", 'libjava/configure', string=True)
enabled_languages = set()#('c', 'c++', 'fortran', 'java', 'objc') enabled_languages = set(('c', 'c++', 'fortran', 'java', 'objc'))
if '+lang_fortran' in spec: if spec.satisfies("@4.7.1:"):
enabled_languages.add('fortran')
if '+lang_c' in spec:
enabled_languages.add('c')
if '+lang_cxx' in spec:
enabled_languages.add('c++')
if '+lang_java' in spec:
enabled_languages.add('java')
if '+lang_objc' in spec:
enabled_languages.add('objc')
if '+lang_objcxx' in spec:
enabled_languages.add('obj-c++')
if '+lang_ada' in spec:
enabled_languages.add('ada')
if '+jit' in spec:
enabled_languages.add('jit')
if spec.satisfies("@4.7.1:") and '+lang_go' in spec:
enabled_languages.add('go') enabled_languages.add('go')
# Generic options to compile GCC # Generic options to compile GCC
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
# Produced at the Lawrence Livermore National Laboratory. # Produced at the Lawrence Livermore National Laboratory.
# #
# This file is part of Spack. # This file is part of Spack.
# Written by David Beckingsale, david@llnl.gov # Written by David Beckingsale, david@llnl.gov, All rights reserved.
# Heavily modified by others, including Tom Scogland, scogland1@llnl.gov # LLNL-CODE-647188
# All rights reserved. LLNL-CODE-647188
# #
# For details, see https://github.com/llnl/spack # For details, see https://github.com/llnl/spack
# Please also see the LICENSE file for our notice and the LGPL. # Please also see the LICENSE file for our notice and the LGPL.
...@@ -24,7 +23,6 @@ ...@@ -24,7 +23,6 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from spack import * from spack import *
import os
class Llvm(Package): class Llvm(Package):
...@@ -42,147 +40,33 @@ class Llvm(Package): ...@@ -42,147 +40,33 @@ class Llvm(Package):
version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz') version('3.5.1', '2d3d8004f38852aa679e5945b8ce0b14', url='http://llvm.org/releases/3.5.1/llvm-3.5.1.src.tar.xz')
version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') # currently required by mesa package version('3.0', 'a8e5f5f1c1adebae7b4a654c376a6005', url='http://llvm.org/releases/3.0/llvm-3.0.tar.gz') # currently required by mesa package
variant('debug', default=False, description="Build a debug version of LLVM, this increases binary size considerably")
variant('clang', default=True, description="Build the LLVM C/C++/Objective-C compiler frontend")
variant('clang_extra', default=True, description="Build the clang extra tools")
variant('lldb', default=True, description="Build the LLVM debugger")
variant('internal_unwind', default=True, description="Build and use the libcxxabi built-in unwinder")
variant('compiler-rt', default=False, description="Compiler runtime including sanitizers and unwinding libraries")
variant('gold', default=True, description="Add support for the gold linker and build the gold linker plugin for LTO")
# Universal dependency
depends_on('python@2.7:') depends_on('python@2.7:')
# lldb dependencies variant('libcxx', default=False, description="Builds the LLVM Standard C++ library targeting C++11")
depends_on('ncurses', when='+lldb')
depends_on('swig', when='+lldb')
depends_on('libedit', when='+lldb')
# gold support
depends_on('binutils+gold', when='+gold')
base_url = 'http://llvm.org/releases/%%(version)s/%(pkg)s-%%(version)s.src.tar.xz'
llvm_url = base_url % { 'pkg' : 'llvm'}
resources = {
'compiler-rt' : {
'url' : base_url % { 'pkg' : 'compiler-rt'},
'destination' : 'projects',
'placement' : 'compiler-rt',
},
'openmp' : {
'url' : base_url % { 'pkg' : 'openmp'},
'destination' : 'projects',
'placement' : 'openmp',
},
'libcxx' : {
'url' : base_url % { 'pkg' : 'libcxx'},
'destination' : 'projects',
'placement' : 'libcxx',
},
'libcxxabi' : {
'url' : base_url % { 'pkg' : 'libcxxabi'},
'destination' : 'projects',
'placement' : 'libcxxabi',
},
'clang' : {
'url' : base_url % { 'pkg' : 'cfe'},
'destination' : 'tools',
'placement' : 'clang',
},
'clang-tools-extra' : {
'url' : base_url % { 'pkg' : 'clang-tools-extra'},
'destination' : 'tools/clang/tools',
'placement' : 'clang-tools-extra',
},
'lldb' : {
'url' : base_url % { 'pkg' : 'lldb'},
'destination' : 'tools',
'placement' : 'lldb',
},
'polly' : {
'url' : base_url % { 'pkg' : 'polly'},
'destination' : 'tools',
'placement' : 'polly',
},
'llvm-libunwind' : {
'url' : base_url % { 'pkg' : 'libunwind'},
'destination' : 'projects',
'placement' : 'libunwind',
},
}
releases = [
{
'version' : '3.7.0',
'md5':'b98b9495e5655a672d6cb83e1a180f8e',
'resources' : {
# FIXME: compiler-rt
# 'compiler-rt' : '383c10affd513026f08936b5525523f5',
'openmp' : 'f482c86fdead50ba246a1a2b0bbf206f',
'polly' : '32f93ffc9cc7e042df22089761558f8b',
'libcxx' : '46aa5175cbe1ad42d6e9c995968e56dd',
'libcxxabi' : '5aa769e2fca79fa5335cfae8f6258772',
'clang' : '8f9d27335e7331cf0a4711e952f21f01',
'clang-tools-extra' : 'd5a87dacb65d981a427a536f6964642e',
'lldb' : 'e5931740400d1dc3e7db4c7ba2ceff68',
'llvm-libunwind' : '9a75392eb7eb8ed5c0840007e212baf5',
}
},
{
'version' : '3.6.2',
'md5':'0c1ee3597d75280dee603bae9cbf5cc2',
'resources' : {
'compiler-rt' : 'e3bc4eb7ba8c39a6fe90d6c988927f3c',
'openmp' : '65dd5863b9b270960a96817e9152b123',
'libcxx' : '22214c90697636ef960a49aef7c1823a',
'libcxxabi' : '17518e361e4e228f193dd91e8ef54ba2',
'clang' : 'ff862793682f714bb7862325b9c06e20',
'clang-tools-extra' : '3ebc1dc41659fcec3db1b47d81575e06',
'lldb' : '51e5eb552f777b950bb0ff326e60d5f0',
}
},
{
'version' : '3.5.1',
'md5':'2d3d8004f38852aa679e5945b8ce0b14',
'resources' : {
'compiler-rt' : 'd626cfb8a9712cb92b820798ab5bc1f8',
'openmp' : '121ddb10167d7fc38b1f7e4b029cf059',
'libcxx' : '406f09b1dab529f3f7879f4d548329d2',
'libcxxabi' : 'b22c707e8d474a99865ad3c521c3d464',
'clang' : '93f9532f8f7e6f1d8e5c1116907051cb',
'clang-tools-extra' : 'f13f31ed3038acadc6fa63fef812a246',
'lldb' : 'cc5ea8a414c62c33e760517f8929a204',
}
},
]
for release in releases: ##########
version(release['version'], release['md5'], url=llvm_url % release) # @3.7.0
resource(name='compiler-rt',
for name, md5 in release['resources'].items(): url='http://llvm.org/releases/3.7.0/compiler-rt-3.7.0.src.tar.xz', md5='383c10affd513026f08936b5525523f5',
resource(name=name, destination='projects', when='@3.7.0')
url=resources[name]['url'] % release, resource(name='openmp',
md5=md5, url='http://llvm.org/releases/3.7.0/openmp-3.7.0.src.tar.xz', md5='f482c86fdead50ba246a1a2b0bbf206f',
destination=resources[name]['destination'], destination='projects', when='@3.7.0')
when='@%(version)s' % release, resource(name='libcxx',
placement=resources[name].get('placement', None)) url='http://llvm.org/releases/3.7.0/libcxx-3.7.0.src.tar.xz', md5='46aa5175cbe1ad42d6e9c995968e56dd',
destination='projects', placement='libcxx', when='+libcxx@3.7.0')
resource(name='libcxxabi',
url='http://llvm.org/releases/3.7.0/libcxxabi-3.7.0.src.tar.xz', md5='5aa769e2fca79fa5335cfae8f6258772',
destination='projects', placement='libcxxabi', when='+libcxx@3.7.0')
##########
def install(self, spec, prefix): def install(self, spec, prefix):
env['CXXFLAGS'] = self.compiler.cxx11_flag env['CXXFLAGS'] = self.compiler.cxx11_flag
build_type = 'Debug' if '+debug' in spec else 'Release'
if '+clang' not in spec:
if '+clang_extra' in spec:
raise SpackException('The clang_extra variant requires the clang variant to be selected')
if '+lldb' in spec:
raise SpackException('The lldb variant requires the clang variant to be selected')
with working_dir('spack-build', create=True): with working_dir('spack-build', create=True):
cmake('..', cmake('..',
'-DCMAKE_RELEASE_TYPE=' + build_type,
'-DLLVM_REQUIRES_RTTI:BOOL=ON', '-DLLVM_REQUIRES_RTTI:BOOL=ON',
'-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix, '-DPYTHON_EXECUTABLE:PATH=%s/bin/python' % spec['python'].prefix,
*std_cmake_args) *std_cmake_args)
make("VERBOSE=1") make()
make("install") make("install")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment