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

name = "Clang"
version = "3.2"

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': '4.7.3'}

source_urls = ["http://llvm.org/releases/%(version)s"]
sources = [
    "llvm-%(version)s.src.tar.gz",
    "clang-%(version)s.src.tar.gz",
    "compiler-rt-%(version)s.src.tar.gz",
]

# Remove some tests that fail because of -DGCC_INSTALL_PREFIX.  The issue is
# that hardcoded GCC_INSTALL_PREFIX overrides -sysroot.  This probably breaks
# cross-compilation.
# http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130401/077539.html
patches = ['Clang-3.2-failing-tests-due-to-gcc-installation-prefix.patch']

builddependencies = [('CMake', '2.8.4')]

sanity_check_paths = {
    'files': ['bin/clang', 'bin/clang++', 'lib/libclang.%s' % SHLIB_EXT, 'lib/clang/3.2/include/stddef.h'],
    'dirs': []
}

languages = ['c', 'c++']

moduleclass = 'compiler'

assertions = False

usepolly = False
