mirror of
https://github.com/gosticks/brew.git
synced 2026-10-06 07:26:56 +00:00
Merge pull request #5505 from sjackman/march-native-linux
Use -march=native for non-bottle source builds [Linux]
This commit is contained in:
@@ -1 +1,5 @@
|
||||
require "extend/os/mac/extend/ENV/shared" if OS.mac?
|
||||
if OS.mac?
|
||||
require "extend/os/mac/extend/ENV/shared"
|
||||
elsif OS.linux?
|
||||
require "extend/os/linux/extend/ENV/shared"
|
||||
end
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
module SharedEnvExtension
|
||||
# @private
|
||||
def effective_arch
|
||||
if ARGV.build_bottle?
|
||||
ARGV.bottle_arch || Hardware.oldest_cpu
|
||||
else
|
||||
:native
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7,6 +7,7 @@ module Hardware
|
||||
|
||||
class << self
|
||||
OPTIMIZATION_FLAGS = {
|
||||
native: "-march=native",
|
||||
nehalem: "-march=nehalem",
|
||||
penryn: "-march=penryn",
|
||||
core2: "-march=core2",
|
||||
|
||||
Reference in New Issue
Block a user