# This compiler version is not supported beyond these very strict use cases:
# 1) Building newer llvm Mountain Lion (https://trac.macports.org/ticket/53138)
# There should be no other usage of clang-3.7 nor llvm-3.7
# llvm-3.7 was the last version to use the autoconf build system. Newer
# versions require cmake to build. Cmake requires a C++11 toolchain, so
# clang-3.7 is being kept around in order to build cmake (or its dependencies)
# if needed on such systems.
PortGroup compiler_blacklist_versions 1.0
PortGroup active_variants 1.1
set llvm_version_no_dot 37
name llvm-${llvm_version}
subport clang-${llvm_version} { revision 5 }
set suffix mp-${llvm_version}
set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
maintainers {jeremyhu @jeremyhu} {larryv @larryv}
if {${subport} eq "llvm-${llvm_version}"} {
homepage http://llvm.org/
description llvm is a next generation compiler infrastructure
long_description The LLVM Core libraries provide a modern source- and \
target-independent optimizer, along with code \
generation support for many popular CPUs (as well as \
some less common ones!) These libraries are built \
around a well specified code representation known as \
the LLVM intermediate representation ("LLVM IR").
depends_lib port:libedit port:libffi port:ncurses port:zlib
depends_run bin:perl:perl5 port:llvm_select
# 3.2.6's install_name_tool doesn't support load commands we might see with newer clang+ld64
# 4.3 is just a guess here and should be updated if there are additional reports with other Xcode versions
if {[vercmp $xcodeversion 4.3] < 0 && [string match "*macports*" ${configure.compiler}]} {
depends_build-append port:cctools
depends_skip_archcheck-append cctools
} elseif {${subport} eq "clang-${llvm_version}"} {
homepage http://clang.llvm.org/
description C, C++, Objective C and Objective C++ compiler
long_description Clang is an "LLVM native" C/C++/Objective-C compiler, \
which aims to deliver amazingly fast compiles (e.g. \
about 3x faster than GCC when compiling Objective-C \
code in a debug configuration), extremely useful error \
and warning messages and to provide a platform for \
building great source level tools. The included Clang \
Static Analyzer is a tool that automatically finds bugs in \
your code, and is a great example of the sort of tool \
that can be built using the Clang frontend as a \
library to parse C/C++ code.
depends_lib port:libxml2 port:llvm-${llvm_version} port:python27
depends_run port:clang_select port:ld64