##
# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild
#
# Copyright:: Copyright 2013-2015 Dmitri Gribenko, Ward Poelmans
# Authors:: Dmitri Gribenko <gribozavr@gmail.com>
# Authors:: Ward Poelmans <wpoely86@gmail.com>
# License:: GPLv2 or later, MIT, three-clause BSD.
# $Id$
##

name = 'Clang'
version = '5.0.0'

homepage = 'http://clang.llvm.org/'
description = """C, C++, Objective-C compiler, based on LLVM.  Does not
 include C++ standard library -- use libstdc++ from GCC."""

# Clang also depends on libstdc++ during runtime, but this dependency is
# already specified as the toolchain.
toolchain = {'name': 'GCC', 'version': '6.4.0-2.28'}
# Do not set optarch to True: it will cause the build to fail
toolchainopts = {'optarch': False}

source_urls = ["http://llvm.org/releases/%(version)s"]
sources = [
    'llvm-%(version)s.src.tar.xz',
    'cfe-%(version)s.src.tar.xz',
    'compiler-rt-%(version)s.src.tar.xz',
    'polly-%(version)s.src.tar.xz',
    'openmp-%(version)s.src.tar.xz',
]
checksums = [
    'e35dcbae6084adcf4abb32514127c5eabd7d63b733852ccdb31e06f1373136da',  # llvm-5.0.0.src.tar.xz
    '019f23c2192df793ac746595e94a403908749f8e0c484b403476d2611dd20970',  # cfe-5.0.0.src.tar.xz
    'd5ad5266462134a482b381f1f8115b6cad3473741b3bb7d1acc7f69fd0f0c0b3',  # compiler-rt-5.0.0.src.tar.xz
    '44694254a2b105cec13ce0560f207e8552e6116c181b8d21bda728559cf67042',  # polly-5.0.0.src.tar.xz
    'c0ef081b05e0725a04e8711d9ecea2e90d6c3fbb1622845336d3d095d0a3f7c5',  # openmp-5.0.0.src.tar.xz
]

dependencies = [
    ('GMP', '6.1.2'),
]

builddependencies = [
    ('CMake', '3.10.0'),
    ('Python', '2.7.14', '-bare'),
    ('libxml2', '2.9.7'),
]

assertions = True

usepolly = True

moduleclass = 'compiler'
