diff options
| author | Jonathan Ragan-Kelley | 2011-05-11 18:32:19 -0400 |
|---|---|---|
| committer | Adam Vandenberg | 2011-05-19 08:07:21 -0700 |
| commit | 5f61cdc03a01af2e2748312658c219d1025f2a9c (patch) | |
| tree | b54d83a95e29b00891fe04ffbf744fcf626147f5 /Library/Formula/llvm.rb | |
| parent | f6294f94cd1be64bd8a83b1579ca159c566649a7 (diff) | |
| download | homebrew-5f61cdc03a01af2e2748312658c219d1025f2a9c.tar.bz2 | |
Added `--all-targets` option to LLVM recipe.
Optionally builds LLVM with support for all available targets,
not just the host target backend. (Most relevant: arm.)
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/llvm.rb')
| -rw-r--r-- | Library/Formula/llvm.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Formula/llvm.rb b/Library/Formula/llvm.rb index 955fa3517..e3226dc29 100644 --- a/Library/Formula/llvm.rb +++ b/Library/Formula/llvm.rb @@ -1,6 +1,7 @@ require 'formula' def build_clang?; ARGV.include? '--with-clang'; end +def build_all_targets?; ARGV.include? '--all-targets'; end def build_universal?; ARGV.build_universal?; end def build_shared?; ARGV.include? '--shared'; end def build_rtti?; ARGV.include? '--rtti'; end @@ -26,6 +27,7 @@ class Llvm < Formula def options [['--with-clang', 'Also build & install clang'], ['--shared', 'Build shared library'], + ['--all-targets', 'Build all target backends'], ['--rtti', 'Build with RTTI information'], ['--universal', 'Build both i386 and x86_64 architectures']] end @@ -51,9 +53,14 @@ class Llvm < Formula ENV['REQUIRES_RTTI'] = '1' if build_rtti? configure_options = ["--prefix=#{prefix}", - "--enable-targets=host-only", "--enable-optimized"] + if build_all_targets? + configure_options << "--enable-targets=all" + else + configure_options << "--enable-targets=host-only" + end + configure_options << "--enable-shared" if build_shared? system "./configure", *configure_options |
