mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #16380 from cho-m/cpuid-in-static-lib
This commit is contained in:
commit
d1625b6e3d
@ -324,6 +324,14 @@ module FormulaCellarChecks
|
||||
cpuid_instruction?(file, objdump)
|
||||
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`."
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user