aboutsummaryrefslogtreecommitdiffstats
path: root/Library/ENV
diff options
context:
space:
mode:
authorJack Nagel2013-11-20 12:54:34 -0600
committerJack Nagel2013-11-20 13:19:06 -0600
commitcee5e1296b637914d2af5882f34cbdd23a06f017 (patch)
treed575a9c25f87f3c55f58b52743286f74aea8897b /Library/ENV
parentb8d2ae81f374c99203a3ab3847a8c0c0b751762b (diff)
downloadhomebrew-cee5e1296b637914d2af5882f34cbdd23a06f017.tar.bz2
Move optimization flag selection out of cc wrapper
The mapping of architectures to optimization flags is now retrieved from Hardware::CPU and the selected flags are passed as an environmen variable, rather than duplicated in the cc wrapper and re-calculated on every invocation of the compiler. Closes #24540.
Diffstat (limited to 'Library/ENV')
-rwxr-xr-xLibrary/ENV/4.3/cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 383941807..92b09a48c 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -184,22 +184,7 @@ class Cmd
def optflags
args = []
args << "-#{ENV['HOMEBREW_OPTIMIZATION_LEVEL']}"
-
- # When bottling use the oldest supported CPU type.
- if cccfg? 'bc'
- # Custom bottle specified during the build
- args << ENV['HOMEBREW_ARCHFLAGS']
- elsif cccfg? 'bi6'
- args << '-march=core2'
- elsif cccfg? 'bi'
- args << '-march=prescott'
- elsif cccfg? 'bpA'
- args << '-mcpu=7400'
- elsif cccfg? 'bp'
- args << '-mcpu=750'
- else
- args << '-march=native' if tool =~ /clang/
- end
+ args.concat ENV['HOMEBREW_OPTFLAGS'].split(' ') if ENV['HOMEBREW_OPTFLAGS']
args
end
def archflags