diff options
| author | Adam Vandenberg | 2010-06-16 11:50:36 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-16 11:50:36 -0700 |
| commit | 76168e8e87e22af8037c66a6b06feefd136eeaf0 (patch) | |
| tree | 3982bfcd73f30707e5b467dffdd469b8db7b024b | |
| parent | 9638c1820a20aa82e2f1dc5b8e374cc0e6426832 (diff) | |
| download | brew-76168e8e87e22af8037c66a6b06feefd136eeaf0.tar.bz2 | |
Add "fails_with_llvm" to formula to document LLVM build breaks.
Replaced ENV.gcc_4_2 + comments with calls to "fails_with_llvm",
to specifically message to the user when a formula is known or suspected
to not build with LLVM. If the user specifies "--use-llvm", the message
will be displayed, but compilation will be tried anyway.
Since using LLVM is now an advanced/hidden feature instead of the
default on 10.6, we'll let the user try anyway (and submit patches
if things are now working.)
| -rw-r--r-- | Library/Homebrew/formula.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 5353c65d4..9471f58b5 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -296,6 +296,17 @@ class Formula self.class.external_deps end + def fails_with_llvm msg="", data=nil + return unless (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm') + + build = data.delete :build rescue nil + msg = "(No specific reason was given)" if msg.empty? + + opoo "LLVM was requested, but this formula is reported as not working with LLVM:" + puts msg + puts "Tested with LLVM build #{build}" unless build == nil + end + protected # Pretty titles the command and buffers stdout/stderr # Throws if there's an error |
