aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat/fails_with_llvm.rb
blob: 19338ceb54f52523e8f195017526aa435d580a27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Formula
  def fails_with_llvm msg=nil, data=nil
    opoo "Calling fails_with_llvm in the install method is deprecated"
    puts "Use the fails_with DSL instead"
  end

  def fails_with_llvm?
    fails_with? :llvm
  end

  def self.fails_with_llvm msg=nil, data={}
    case msg when Hash then data = msg end
    failure = CompilerFailure.new(:llvm) { build(data.delete(:build).to_i) }
    @cc_failures ||= Set.new
    @cc_failures << failure
  end
end