formula_cellar_checks: detect cpuid in static libs
This commit is contained in:
parent
4a8d9ce246
commit
53accccfb2
@ -324,6 +324,14 @@ module FormulaCellarChecks
|
|||||||
cpuid_instruction?(file, objdump)
|
cpuid_instruction?(file, objdump)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
hardlinks = Set.new
|
||||||
|
return if formula.lib.directory? && formula.lib.find.any? do |pn|
|
||||||
|
next false if pn.symlink? || pn.directory? || pn.extname != ".a"
|
||||||
|
next false unless hardlinks.add? [pn.stat.dev, pn.stat.ino]
|
||||||
|
|
||||||
|
cpuid_instruction?(pn, objdump)
|
||||||
|
end
|
||||||
|
|
||||||
"No `cpuid` instruction detected. #{formula} should not use `ENV.runtime_cpu_detection`."
|
"No `cpuid` instruction detected. #{formula} should not use `ENV.runtime_cpu_detection`."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user