# * Update clang and lldb subports to build against installed libLLVM/libclang
PortGroup compiler_blacklist_versions 1.0
PortGroup active_variants 1.1
set llvm_version_no_dot 70
set clang_executable_version 7
set lldb_executable_version 7.0.1
name llvm-${llvm_version}
subport clang-${llvm_version} {}
subport lldb-${llvm_version} { revision 0 }
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 https://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 path:lib/libxar.dylib:xar port:zlib
depends_run bin:perl:perl5 port:llvm_select
} elseif {${subport} eq "clang-${llvm_version}"} {
homepage https://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:libomp port:llvm-${llvm_version} port:python27
depends_run port:clang_select port:ld64
depends_skip_archcheck-append ld64 subversion
# Clang doesn't actually use any of these, but the LLVM makefile
# system overlinks its binaries. Remove (or convert to build deps?)
# after #46040 is resolved.
depends_lib-append port:libedit port:libffi port:ncurses port:zlib
# Older Xcode's lipo doesn't support x86_64h slices
# https://trac.macports.org/ticket/53159
# Older Xcode's ranlib doesn't understand objects produced by newer clang (malformed object (unknown load command 2))