diff options
| author | Adam Vandenberg | 2010-06-16 11:50:36 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-16 11:50:36 -0700 |
| commit | c5d56bc501664b5a159b60e86672fcdda5c19d27 (patch) | |
| tree | d42467e075ff5038184e8763ed23a80c3fccb40b /Library/Homebrew | |
| parent | 8ecc795b361cc4a2c3d342062e86f7559ac08c0c (diff) | |
| download | homebrew-c5d56bc501664b5a159b60e86672fcdda5c19d27.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.)
Diffstat (limited to 'Library/Homebrew')
| -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 |
