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
commite0d24922474f2a10b82b8dede1b54552ed72ebed (patch)
tree495fa11584b16a53d667ad7a8fa682d21a047304 /Library/ENV
parent78f9b23218a45fd5d5b2237741b0b2bb89dca66b (diff)
downloadbrew-e0d24922474f2a10b82b8dede1b54552ed72ebed.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 Homebrew/homebrew#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