Add HOMEBREW_ARCH
This commit is contained in:
parent
7c719b756f
commit
c6fd1ceaef
@ -3,6 +3,20 @@
|
|||||||
module Hardware
|
module Hardware
|
||||||
class CPU
|
class CPU
|
||||||
class << self
|
class << self
|
||||||
|
native_arch = (ENV["HOMEBREW_ARCH"] || "native").freeze
|
||||||
|
OPTIMIZATION_FLAGS_LINUX = {
|
||||||
|
native: "-march=#{native_arch}",
|
||||||
|
nehalem: "-march=nehalem",
|
||||||
|
core2: "-march=core2",
|
||||||
|
core: "-march=prescott",
|
||||||
|
armv6: "-march=armv6",
|
||||||
|
armv8: "-march=armv8-a",
|
||||||
|
}.freeze
|
||||||
|
|
||||||
|
def optimization_flags
|
||||||
|
OPTIMIZATION_FLAGS_LINUX
|
||||||
|
end
|
||||||
|
|
||||||
def cpuinfo
|
def cpuinfo
|
||||||
@cpuinfo ||= File.read("/proc/cpuinfo")
|
@cpuinfo ||= File.read("/proc/cpuinfo")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user