diff options
| -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 |
