std: use HOMEBREW_ARCH env var on Linux
Unlike macOS, Linux installations can be installed/deployed on a variety of hardware. The HOMEBREW_ARCH environment variable allows the end user to set a custom -march=... option for the compiler. If the variable is not set, it defaults to "native". This only applies on Linux; on macOS, behavior remains unchanged.
This commit is contained in:
parent
88bf60d589
commit
90c25bf913
@ -7,7 +7,8 @@ module Stdenv
|
||||
|
||||
# @private
|
||||
SAFE_CFLAGS_FLAGS = "-w -pipe".freeze
|
||||
DEFAULT_FLAGS = "-march=core2 -msse4".freeze
|
||||
HOMEBREW_ARCH = (ENV["HOMEBREW_ARCH"] || "native").freeze
|
||||
DEFAULT_FLAGS = (OS.mac? ? "-march=core2 -msse4" : "-march=#{HOMEBREW_ARCH}").freeze
|
||||
|
||||
# @private
|
||||
def setup_build_environment(formula = nil)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user