diff options
| author | John Wiegley | 2013-01-12 15:40:46 -0600 |
|---|---|---|
| committer | Adam Vandenberg | 2013-01-31 10:29:53 -0800 |
| commit | dd8b5b2c2e53d211c9552fef1dacc6890cc2a7bd (patch) | |
| tree | de22d6dcb4094f01e2d510f7aa1847fdd42d1df7 /Library/Formula | |
| parent | 7b867cdfc5ce4315b828d895b66716bbfab90e6c (diff) | |
| download | homebrew-dd8b5b2c2e53d211c9552fef1dacc6890cc2a7bd.tar.bz2 | |
llvm: add support for building Clang with ASan
Closes #17039.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/llvm.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Library/Formula/llvm.rb b/Library/Formula/llvm.rb index d20ea232c..3708ac37e 100644 --- a/Library/Formula/llvm.rb +++ b/Library/Formula/llvm.rb @@ -8,6 +8,14 @@ class Clang < Formula head 'http://llvm.org/git/clang.git' end +class CompilerRt < Formula + homepage 'http://llvm.org/' + url 'http://llvm.org/releases/3.2/compiler-rt-3.2.src.tar.gz' + sha1 '718c0249a00e928f8bba32c84771da998ea4d42f' + + head 'http://llvm.org/git/compiler-rt.git' +end + class Llvm < Formula homepage 'http://llvm.org/' url 'http://llvm.org/releases/3.2/llvm-3.2.src.tar.gz' @@ -23,6 +31,7 @@ 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 'shared', 'Build LLVM as a shared library' option 'all-targets', 'Build all target backends' option 'rtti', 'Build with C++ RTTI' @@ -33,7 +42,13 @@ class Llvm < Formula exit 1 end - Clang.new("clang").brew { clang_dir.install Dir['*'] } if build.include? 'with-clang' + Clang.new("clang").brew do + 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' |
