Merge pull request #13366 from hyuraku/repair-check_cpuid_instruction

move check ENV.runtime_cpu_detection to `utils/ast`
This commit is contained in:
Mike McQuaid 2022-06-28 09:59:41 +01:00 committed by GitHub
commit 36d14ae49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,7 @@ module FormulaCellarChecks
dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb" dot_brew_formula = formula.prefix/".brew/#{formula.name}.rb"
return unless dot_brew_formula.exist? return unless dot_brew_formula.exist?
# TODO: add methods to `utils/ast` to allow checking for method use
return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection" return unless dot_brew_formula.read.include? "ENV.runtime_cpu_detection"
# macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster) # macOS `objdump` is a bit slow, so we prioritise llvm's `llvm-objdump` (~5.7x faster)