Skip to content

Commit

Permalink
Merge pull request #1673 from MikeMcQuaid/audit-fails-with-llvm
Browse files Browse the repository at this point in the history
audit: flag use of "fails_with :llvm".
  • Loading branch information
MikeMcQuaid committed Dec 18, 2016
2 parents b87d27f + cf1fa0c commit e95c843
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Homebrew/dev-cmd/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,10 @@ def audit_line(line, _lineno)
problem "Use Language::Node for npm install args"
end

if line.include?("fails_with :llvm")
problem "'fails_with :llvm' is now a no-op so should be removed"
end

return unless @strict

if line =~ /system ((["'])[^"' ]*(?:\s[^"' ]*)+\2)/
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2340,6 +2340,8 @@ def cxxstdlib_check(check_type)
# version '4.8.1'
# end</pre>
def fails_with(compiler, &block)
# TODO: deprecate this in future.
# odeprecated "fails_with :llvm" if compiler == :llvm
specs.each { |spec| spec.fails_with(compiler, &block) }
end

Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/software_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def patch(strip = :p1, src = nil, &block)
end

def fails_with(compiler, &block)
# TODO: deprecate this in future.
# odeprecated "fails_with :llvm" if compiler == :llvm
compiler_failures << CompilerFailure.create(compiler, &block)
end

Expand Down

0 comments on commit e95c843

Please sign in to comment.