diff options
| author | Xiyue Deng | 2013-08-16 23:55:11 -0700 |
|---|---|---|
| committer | Xiyue Deng | 2013-08-21 01:11:04 -0700 |
| commit | 9e4c2092fe0b3701a07780ff5beca6c1f2d66081 (patch) | |
| tree | c248913b4c0c8a2dc65a6e6527206a33afcac318 /Library | |
| parent | 86a2a0d562e72b2c27a228cb4454a4a3f9c46c2f (diff) | |
| download | homebrew-9e4c2092fe0b3701a07780ff5beca6c1f2d66081.tar.bz2 | |
Simplify llvm formula.
* Stop shipping most binaries except llvm-config. Now llvm is supposed to be
used as a library only.
* Add caveat to point user to homebrew-versions for full featured llvms.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/llvm.rb | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/Library/Formula/llvm.rb b/Library/Formula/llvm.rb index 49047b4f6..c4ab475e8 100644 --- a/Library/Formula/llvm.rb +++ b/Library/Formula/llvm.rb @@ -4,16 +4,6 @@ class Clang < Formula homepage 'http://llvm.org/' url 'http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz' sha1 'ccd6dbf2cdb1189a028b70bcb8a22509c25c74c8' - - head 'http://llvm.org/git/clang.git' -end - -class CompilerRt < Formula - homepage 'http://llvm.org/' - url 'http://llvm.org/releases/3.3/compiler-rt-3.3.src.tar.gz' - sha1 '745386ec046e3e49742e1ecb6912c560ccd0a002' - - head 'http://llvm.org/git/compiler-rt.git' end class Llvm < Formula @@ -21,8 +11,6 @@ class Llvm < Formula url 'http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz' sha1 'c6c22d5593419e3cb47cbcf16d967640e5cce133' - head 'http://llvm.org/git/llvm.git' - bottle do sha1 '61854a2cf08a1398577f74fea191a749bec3e72d' => :mountain_lion sha1 'fbe7b85a50f4b283ad55be020c7ddfbf655435ad' => :lion @@ -31,7 +19,6 @@ class Llvm < Formula option :universal option 'with-clang', 'Build Clang C/ObjC/C++ frontend' - option 'with-asan', 'Include support for -faddress-sanitizer (from compiler-rt)' option 'disable-shared', "Don't build LLVM as a shared library" option 'all-targets', 'Build all target backends' option 'rtti', 'Build with C++ RTTI' @@ -50,10 +37,6 @@ class Llvm < Formula clang_dir.install Dir['*'] end if build.include? 'with-clang' - CompilerRt.new("compiler-rt").brew do - (buildpath/'projects/compiler-rt').install Dir['*'] - end if build.include? 'with-asan' - if build.universal? ENV['UNIVERSAL'] = '1' ENV['UNIVERSAL_ARCH'] = Hardware::CPU.universal_archs.join(' ') @@ -79,22 +62,24 @@ class Llvm < Formula args << "--disable-assertions" if build.include? 'disable-assertions' system "./configure", *args - system "make install" + system 'make', 'VERBOSE=1' + system 'make', 'VERBOSE=1', 'install' # install llvm python bindings if python - unless build.head? - inreplace buildpath/'bindings/python/llvm/common.py', 'LLVM-3.1svn', "libLLVM-#{version}svn" - end python.site_packages.install buildpath/'bindings/python/llvm' end - # install clang tools and bindings + # Install clang tools and bindings cd clang_dir do - system 'make install' (share/'clang/tools').install 'tools/scan-build', 'tools/scan-view' python.site_packages.install 'bindings/python/clang' if python end if build.include? 'with-clang' + + # Remove all binaries except llvm-config + Dir[bin/'*'].each do |exec_path| + rm_f exec_path unless File.basename(exec_path) == 'llvm-config' + end end def test @@ -105,6 +90,13 @@ class Llvm < Formula s = '' s += python.standard_caveats if python s += <<-EOS.undent + This formula only provide library components of LLVM. To use full + featured LLVM please try the llvm3* formulae in homebrew-versions tap, + for instance: + + brew tap homebrew/versions + brew install llvm33 + Extra tools are installed in #{share}/llvm and #{share}/clang. If you already have LLVM installed, then "brew upgrade llvm" might not work. |
